Skip to content

Commit

Permalink
chore(webpack): disable devtool for production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuan Vo committed May 31, 2023
1 parent 486811e commit 135609b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"rxjs": "^7.8.0",
"style-loader": "^3.3.1",
"svg-url-loader": "^8.0.0",
"terser-webpack-plugin": "^5.3.3",
"ts-jest": "^27.0.5",
"ts-loader": "^9.4.2",
"tsconfig-paths-webpack-plugin": "^4.0.0",
Expand Down
12 changes: 10 additions & 2 deletions webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ const { EnvironmentPlugin } = require('webpack');

module.exports = merge(common('production'), {
mode: 'production',
devtool: 'eval-source-map',
devtool: false,
cache: {
type: 'filesystem',
compression: 'gzip',
cacheDirectory: path.resolve(__dirname, '.build_cache'),
},
optimization: {
minimize: true,
minimizer: [
new TerserJSPlugin({}),
new TerserJSPlugin({
terserOptions: {
format: {
comments: false,
},
},
extractComments: false,
}),
new CssMinimizerPlugin({
minimizerOptions: {
preset: ['default', { mergeLonghand: false }]
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3991,7 +3991,6 @@ __metadata:
showdown: ^2.1.0
style-loader: ^3.3.1
svg-url-loader: ^8.0.0
terser-webpack-plugin: ^5.3.3
ts-jest: ^27.0.5
ts-loader: ^9.4.2
tsconfig-paths-webpack-plugin: ^4.0.0
Expand Down Expand Up @@ -12615,7 +12614,7 @@ __metadata:
languageName: node
linkType: hard

"terser-webpack-plugin@npm:^5.1.3, terser-webpack-plugin@npm:^5.3.3":
"terser-webpack-plugin@npm:^5.1.3":
version: 5.3.6
resolution: "terser-webpack-plugin@npm:5.3.6"
dependencies:
Expand Down

0 comments on commit 135609b

Please sign in to comment.