mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 06:31:20 +00:00
fix: minified webpack builds
This commit is contained in:
parent
a8df63ad1a
commit
9e66e806ce
3 changed files with 10 additions and 3 deletions
|
|
@ -53,7 +53,7 @@
|
|||
"eslint": "^4.0.0",
|
||||
"jsdoc-strip-async-await": "^0.1.0",
|
||||
"parallel-webpack": "^2.0.0",
|
||||
"uglifyjs-webpack-plugin": "^1.0.0-beta.1",
|
||||
"uglifyjs-webpack-plugin": "^1.0.0-beta.2",
|
||||
"webpack": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="../webpack/discord.js"></script>
|
||||
<script type="text/javascript" src="../webpack/discord.12.0.0-dev.min.js"></script>
|
||||
<script type="text/javascript" src="auth.js"></script>
|
||||
<script type="text/javascript">
|
||||
(() => {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,14 @@ const createConfig = options => {
|
|||
}),
|
||||
];
|
||||
|
||||
if (options.minify) plugins.push(new UglifyJSPlugin({ uglifyOptions: { output: { comments: false } } }));
|
||||
if (options.minify) {
|
||||
plugins.push(new UglifyJSPlugin({
|
||||
uglifyOptions: {
|
||||
mangle: { keep_classnames: true },
|
||||
output: { comments: false },
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue