Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/config/webpack.config.js
Show First 20 Lines • Show All 309 Lines • ▼ Show 20 Lines | return { | ||||
path | path | ||||
.resolve(info.absoluteResourcePath) | .resolve(info.absoluteResourcePath) | ||||
.replace(/\\/g, '/')), | .replace(/\\/g, '/')), | ||||
// Prevents conflicts when multiple Webpack runtimes (from different apps) | // Prevents conflicts when multiple Webpack runtimes (from different apps) | ||||
// are used on the same page. | // are used on the same page. | ||||
jsonpFunction: `webpackJsonp${appPackageJson.name}`, | jsonpFunction: `webpackJsonp${appPackageJson.name}`, | ||||
}, | }, | ||||
optimization: { | optimization: { | ||||
minimize: false, | minimize: isEnvProduction, | ||||
minimizer: [ | minimizer: [ | ||||
// This is only used in production mode | // This is only used in production mode | ||||
new TerserPlugin({ | new TerserPlugin({ | ||||
terserOptions: { | terserOptions: { | ||||
parse: { | parse: { | ||||
// We want terser to parse ecma 8 code. However, we don't want it | // We want terser to parse ecma 8 code. However, we don't want it | ||||
// to apply any minification steps that turns valid ecma 5 code | // to apply any minification steps that turns valid ecma 5 code | ||||
// into invalid ecma 5 code. This is why the 'compress' and 'output' | // into invalid ecma 5 code. This is why the 'compress' and 'output' | ||||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |