Skip to content

Commit 5daeb8e

Browse files
committed
minor edit to webpack config file
1 parent a1eb1e7 commit 5daeb8e

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

package-lock.json

+24-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,16 @@
116116
"esmify": "^2.1.1",
117117
"https-proxy-agent": "^5.0.1",
118118
"ololog": "1.1.155",
119+
"piscina": "^3.2.0",
119120
"replace-in-file": "^6.3.5",
120121
"rollup": "^2.70.1",
121122
"rollup-plugin-execute": "1.1.1",
123+
"terser-webpack-plugin": "^5.3.9",
122124
"ts-loader": "^9.4.2",
123125
"ts-node": "^10.9.1",
124126
"typescript": "4.7.4",
125127
"webpack": "^5.76.2",
126-
"webpack-cli": "^5.0.1",
127-
"piscina": "^3.2.0"
128+
"webpack-cli": "^5.0.1"
128129
},
129130
"author": {
130131
"name": "Igor Kroitor",

webpack.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'path';
22
import url from 'url';
3+
import TerserPlugin from "terser-webpack-plugin";
34

45
const cwd = url.fileURLToPath (import.meta.url);
56
const outputDirectory = path.normalize (path.join (path.dirname (cwd), 'dist'))
@@ -38,6 +39,7 @@ export default {
3839
target: 'web',
3940
optimization: {
4041
minimize: false,
42+
minimizer: [new TerserPlugin ({ extractComments: false })],
4143
usedExports: true, // these two lines line turns on tree shaking
4244
concatenateModules: false,
4345
},

0 commit comments

Comments
 (0)