Skip to content

Commit 4ee8ba0

Browse files
committed
Use the default Terser minifying plugin and configure it to avoid mangling.
1 parent 62c7f48 commit 4ee8ba0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: webpack.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const path = require('path');
22
const webpack = require('webpack');
3+
const TerserPlugin = require('terser-webpack-plugin');
34
const { options: postgraphileOptions } = require('./src/postgraphileOptions.js');
45

56
module.exports = {
@@ -42,4 +43,15 @@ module.exports = {
4243
node: {
4344
__dirname: false, // just output `__dirname`
4445
},
46+
optimization: {
47+
minimizer: [
48+
new TerserPlugin({
49+
terserOptions: {
50+
// Without this, you may get errors such as
51+
// `Error: GraphQL conflict for 'e' detected! Multiple versions of graphql exist in your node_modules?`
52+
mangle: false,
53+
},
54+
}),
55+
],
56+
},
4557
};

0 commit comments

Comments
 (0)