mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
Merge pull request #4838 from storybooks/core/fix-mangle
Core - do not mangle on production build
This commit is contained in:
commit
b287a99fad
@ -82,6 +82,7 @@
|
||||
"style-loader": "^0.23.1",
|
||||
"svg-url-loader": "^2.3.2",
|
||||
"url-loader": "^1.1.2",
|
||||
"terser-webpack-plugin": "^1.1.0",
|
||||
"webpack": "^4.23.1",
|
||||
"webpack-dev-middleware": "^3.4.0",
|
||||
"webpack-hot-middleware": "^2.24.3"
|
||||
|
@ -4,6 +4,7 @@ import Dotenv from 'dotenv-webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
||||
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
|
||||
import TerserWebpackPlugin from 'terser-webpack-plugin';
|
||||
|
||||
import {
|
||||
includePaths,
|
||||
@ -95,6 +96,16 @@ export default ({
|
||||
chunks: 'all',
|
||||
},
|
||||
runtimeChunk: true,
|
||||
minimizer: [
|
||||
new TerserWebpackPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
terserOptions: {
|
||||
mangle: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
performance: {
|
||||
hints: isProd ? 'warning' : false,
|
||||
|
@ -21370,7 +21370,7 @@ term-size@^1.2.0:
|
||||
dependencies:
|
||||
execa "^0.7.0"
|
||||
|
||||
terser-webpack-plugin@1.1.0:
|
||||
terser-webpack-plugin@1.1.0, terser-webpack-plugin@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz#cf7c25a1eee25bf121f4a587bb9e004e3f80e528"
|
||||
integrity sha512-61lV0DSxMAZ8AyZG7/A4a3UPlrbOBo8NIQ4tJzLPAdGOQ+yoNC7l5ijEow27lBAL2humer01KLS6bGIMYQxKoA==
|
||||
|
Loading…
x
Reference in New Issue
Block a user