Skip to content

Commit

Permalink
fix: source map cause build fail
Browse files Browse the repository at this point in the history
  • Loading branch information
shaodahong committed Sep 23, 2020
1 parent fc7951b commit 41f1564
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion bin/webpack/baseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ const getBaseConfig = async () => {
// 提取公共样式
new MiniCssExtractPlugin({
filename: isDev ? 'css/[name].css' : 'css/[name].[contenthash:7].css',
allChunks: true,
ignoreOrder: true,
}),

Expand Down
2 changes: 1 addition & 1 deletion bin/webpack/prodConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async function getProdConfig(options) {
const baseConfig = await getBaseConfig(options)

return merge(baseConfig, {
devtool: config[process.env.PACKAGE].productionSourceMap ? 'source-map' : false,
devtool: config[process.env.PACKAGE].productionSourceMap ? 'cheap-module-source-map' : false,
optimization: {
minimizer: [
new OptimizeCSSAssetsPlugin({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"sass-loader": "^10.0.2",
"source-map-url": "^0.4.0",
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^4.2.1",
"terser-webpack-plugin": "^4.2.2",
"thread-loader": "^3.0.0",
"ts-loader": "^8.0.3",
"url-loader": "^4.1.0",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8980,10 +8980,10 @@ terser-webpack-plugin@^4.1.0:
terser "^5.0.0"
webpack-sources "^1.4.3"

terser-webpack-plugin@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.2.1.tgz#44b88ef4d7443129fb136a68b5ec3e80d63ec471"
integrity sha512-D0IZQNl1ZN/JivFNDFzOeU2Bk2LdQQESHJhKTHsodpUmISkaeRwVFk7gzHzX4OuQwanDGelOxIEsBt1SZ+s6nA==
terser-webpack-plugin@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.2.2.tgz#d86200c700053bba637913fe4310ba1bdeb5568e"
integrity sha512-3qAQpykRTD5DReLu5/cwpsg7EZFzP3Q0Hp2XUWJUw2mpq2jfgOKTZr8IZKKnNieRVVo1UauROTdhbQJZveGKtQ==
dependencies:
cacache "^15.0.5"
find-cache-dir "^3.3.1"
Expand All @@ -8992,7 +8992,7 @@ terser-webpack-plugin@^4.2.1:
schema-utils "^2.7.1"
serialize-javascript "^5.0.1"
source-map "^0.6.1"
terser "^5.3.1"
terser "^5.3.2"
webpack-sources "^1.4.3"

terser@^4.6.3:
Expand All @@ -9013,10 +9013,10 @@ terser@^5.0.0:
source-map "~0.6.1"
source-map-support "~0.5.12"

terser@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.1.tgz#f50fe20ab48b15234fe9bdd86b10148ad5fca787"
integrity sha512-yD80f4hdwCWTH5mojzxe1q8bN1oJbsK/vfJGLcPZM/fl+/jItIVNKhFIHqqR71OipFWMLgj3Kc+GIp6CeIqfnA==
terser@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.2.tgz#f4bea90eb92945b2a028ceef79181b9bb586e7af"
integrity sha512-H67sydwBz5jCUA32ZRL319ULu+Su1cAoZnnc+lXnenGRYWyLE3Scgkt8mNoAsMx0h5kdo758zdoS0LG9rYZXDQ==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
Expand Down

0 comments on commit 41f1564

Please sign in to comment.