diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/webpack.config.js b/webpack.config.js index e6baeb2..ed7e0a3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,10 +9,18 @@ const ZipPlugin = require('zip-webpack-plugin'); module.exports = { mode: 'production', - entry: './src/index.js', + entry: { + index: './src/index.js', + FANSPEED: './src/js/fan_speed.js', + CHAIR: './src/js/chair.js', + BUTTON: './src/js/buttons.js' + }, output: { - filename: 'index.js', - path: __dirname + '/dist' + path: __dirname + '/dist', + filename: '[name].js', + libraryTarget: 'var', + // `library` determines the name of the global variable + library: '[name]' }, optimization: { minimizer: [new UglifyJsPlugin()], |