make webpack over 9000 times better (#1816)

* webpack stuff

* even better

* Update browser.js
This commit is contained in:
Gus Caplan
2017-08-22 10:55:28 -07:00
committed by Crawl
parent 4520c801d3
commit b055dae998
5 changed files with 17 additions and 6 deletions

View File

@@ -12,6 +12,11 @@ const createConfig = options => {
const plugins = [
new webpack.DefinePlugin({ 'global.GENTLY': false }),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.DefinePlugin({
'process.env': {
__DISCORD_WEBPACK__: '"true"',
},
}),
];
if (options.minify) plugins.push(new UglifyJSPlugin({ uglifyOptions: { output: { comments: false } } }));
@@ -19,7 +24,7 @@ const createConfig = options => {
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line
return {
entry: './src/index.js',
entry: './browser.js',
output: {
path: __dirname,
filename,