Skip to content

Commit

Permalink
minor edit to webpack config file
Browse files Browse the repository at this point in the history
  • Loading branch information
frosty00 committed May 30, 2023
1 parent a1eb1e7 commit 5daeb8e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
46 changes: 24 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,16 @@
"esmify": "^2.1.1",
"https-proxy-agent": "^5.0.1",
"ololog": "1.1.155",
"piscina": "^3.2.0",
"replace-in-file": "^6.3.5",
"rollup": "^2.70.1",
"rollup-plugin-execute": "1.1.1",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "4.7.4",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1",
"piscina": "^3.2.0"
"webpack-cli": "^5.0.1"
},
"author": {
"name": "Igor Kroitor",
Expand Down
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from 'path';
import url from 'url';
import TerserPlugin from "terser-webpack-plugin";

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

0 comments on commit 5daeb8e

Please sign in to comment.