Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit b173070

Browse files
authored
Disable terser comments (#3247)
1 parent a0a8b4b commit b173070

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

dapps/admin/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const config = {
9494
if (isProduction) {
9595
config.output.filename = '[name].[hash:8].js'
9696
config.optimization.minimizer = [
97-
new TerserPlugin({ cache: true, parallel: true }),
97+
new TerserPlugin({ extractComments: false }),
9898
new OptimizeCSSAssetsPlugin({})
9999
]
100100
config.plugins.push(
+15-18
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,47 @@
1-
var path = require("path");
2-
var webpack = require("webpack");
1+
const path = require('path')
32

4-
const isProduction = process.env.NODE_ENV === "production";
5-
6-
var config = {
7-
target: "web",
3+
const config = {
4+
target: 'web',
85
entry: {
9-
app: "./src/index.js"
6+
app: './src/index.js'
107
},
118
devtool: false,
129
output: {
13-
filename: "app.js",
10+
filename: 'app.js',
1411
path: path.resolve(__dirname, 'public')
1512
},
1613
module: {
1714
rules: [
18-
{ test: /\.flow$/, loader: "ignore-loader" },
15+
{ test: /\.flow$/, loader: 'ignore-loader' },
1916
{
2017
test: /\.js$/,
2118
include: [
22-
path.resolve(__dirname, "src"),
23-
path.resolve(__dirname, "node_modules/origin-utils")
19+
path.resolve(__dirname, 'src'),
20+
path.resolve(__dirname, 'node_modules/origin-utils')
2421
],
25-
loader: "babel-loader"
22+
loader: 'babel-loader'
2623
},
2724
{
2825
test: /\.mjs$/,
2926
include: /node_modules/,
30-
type: "javascript/auto"
27+
type: 'javascript/auto'
3128
}
3229
]
3330
},
3431
resolve: {
35-
extensions: [".js", ".json"]
32+
extensions: ['.js', '.json']
3633
},
3734
node: {
38-
fs: "empty"
35+
fs: 'empty'
3936
},
4037
devServer: {
4138
contentBase: path.join(__dirname, 'public'),
4239
headers: {
4340
'Access-Control-Allow-Origin': '*'
4441
}
4542
},
46-
mode: process.env.NODE_ENV === 'production' ? 'production' : "development",
43+
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
4744
plugins: []
48-
};
45+
}
4946

50-
module.exports = config;
47+
module.exports = config

dapps/marketplace/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const config = {
162162
if (isProduction) {
163163
config.output.filename = '[name].[hash:8].js'
164164
config.optimization.minimizer = [
165-
new TerserPlugin({ cache: true, parallel: true, sourceMap: true }),
165+
new TerserPlugin({ extractComments: false }),
166166
new OptimizeCSSAssetsPlugin({})
167167
]
168168
config.plugins.push(

infra/dapp-creator-client/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ if (isProduction) {
110110
config.output.filename = '[name].[hash:8].js'
111111

112112
config.optimization.minimizer = [
113-
new TerserPlugin({ cache: true, parallel: true }),
113+
new TerserPlugin({ extractComments: false }),
114114
new OptimizeCSSAssetsPlugin({})
115115
]
116116

0 commit comments

Comments
 (0)