diff options
| author | Alee14 <alee14498@gmail.com> | 2017-03-26 15:18:10 -0400 |
|---|---|---|
| committer | Alee14 <alee14498@gmail.com> | 2017-03-26 15:18:10 -0400 |
| commit | 29433e2f7dbd0e4a73d3c78ffe1005b922fb5982 (patch) | |
| tree | aa0ad3fe59468cbe452ee597e914839b68c01436 /node_modules/discord.js/webpack.config.js | |
| parent | 878fefb4c4e1f12b804ae5c0def433fa873f4c8b (diff) | |
| download | AleeBot-29433e2f7dbd0e4a73d3c78ffe1005b922fb5982.tar.gz AleeBot-29433e2f7dbd0e4a73d3c78ffe1005b922fb5982.tar.bz2 AleeBot-29433e2f7dbd0e4a73d3c78ffe1005b922fb5982.zip | |
Don't mind me i'm adding the discord.js files
Diffstat (limited to 'node_modules/discord.js/webpack.config.js')
| -rw-r--r-- | node_modules/discord.js/webpack.config.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/node_modules/discord.js/webpack.config.js b/node_modules/discord.js/webpack.config.js new file mode 100644 index 0000000..501279e --- /dev/null +++ b/node_modules/discord.js/webpack.config.js @@ -0,0 +1,43 @@ +/* + ONLY RUN BUILDS WITH `npm run web-dist`! + DO NOT USE NORMAL WEBPACK! IT WILL NOT WORK! +*/ + +const webpack = require('webpack'); +const createVariants = require('parallel-webpack').createVariants; +const version = require('./package.json').version; + +const createConfig = (options) => { + const plugins = [ + new webpack.DefinePlugin({ 'global.GENTLY': false }), + ]; + + if (options.minify) plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true })); + + const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line + + return { + entry: './src/index.js', + output: { + path: __dirname, + filename, + }, + module: { + rules: [ + { test: /\.md$/, loader: 'ignore-loader' }, + ], + }, + node: { + fs: 'empty', + dns: 'mock', + tls: 'mock', + child_process: 'empty', + dgram: 'empty', + zlib: 'empty', + __dirname: true, + }, + plugins, + }; +}; + +module.exports = createVariants({}, { minify: [false, true] }, createConfig); |
