diff --git a/webpack.config.js b/webpack.config.js index a633140..74a9043 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,7 +5,14 @@ const webpack = require('webpack'); module.exports = { context: path.resolve(__dirname, 'src'), - entry: './main.ts', + entry: { + "main": [ + './main.ts' + ], + "styles": [ + './main.scss' + ] + }, devtool: 'source-map', resolve: { extensions: ['.js', '.jsx', '.ts', '.tsx', '.html'], @@ -92,9 +99,6 @@ module.exports = { }] }, plugins: [ - new HtmlWebpackPlugin({ - title: 'Accountant', - template: 'index.ejs' }), new webpack.ProvidePlugin({ "window.jQuery": "jquery" @@ -102,11 +106,21 @@ module.exports = { new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)@angular/, path.resolve(__dirname, './') - ) + ), + new HtmlWebpackPlugin({ + title: 'Accountant', + template: 'index.ejs', + hash: false, + inject: true, + compile: true, + minify: false, + chunks: 'all' + }) ], output: { path: path.resolve(__dirname, 'build'), - filename: 'js/bundle.js', + filename: '[name].bundle.js', + chunkFilename: '[name].chunk.js' //publicPath: 'js' }, devServer: {