mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Added terser-webpack-plugin
This commit is contained in:
1372
examples/cloudflare-worker/wrangler/package-lock.json
generated
1372
examples/cloudflare-worker/wrangler/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^3.3.1",
|
||||
"@cloudflare/wrangler": "^1.19.7",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"ts-loader": "^8.3.0",
|
||||
"typescript": "^4.5.5",
|
||||
"url-loader": "^4.1.1",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const path = require("path");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
/**
|
||||
* @see https://developers.cloudflare.com/workers/cli-wrangler/webpack
|
||||
@@ -9,6 +10,22 @@ module.exports = {
|
||||
entry: "./src/index.ts",
|
||||
target: "webworker",
|
||||
|
||||
/** Adding more minifization (for what it can apply... ) */
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
terserOptions: {
|
||||
format: {
|
||||
comments: false,
|
||||
},
|
||||
},
|
||||
extractComments: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
/**
|
||||
* "development" mode does not support the usage of eval
|
||||
* @see https://github.com/cloudflare/wrangler/issues/1268
|
||||
|
||||
Reference in New Issue
Block a user