separate views bundle

This commit is contained in:
Sebastian Frank
2017-09-01 17:49:37 +02:00
parent 451c9d14aa
commit 7823eb8fd3
5 changed files with 62 additions and 53 deletions

View File

@@ -3,7 +3,6 @@ var path = require('path');
// Naming and path settings
var appName = 'app';
var entryPoint = './src/main.js';
var exportPath = path.resolve(__dirname, './build');
@@ -27,9 +26,6 @@ if (env === 'production') {
}
));
appName = appName + '.js';
} else {
appName = appName + '.js';
}
// Main Settings config
@@ -43,7 +39,8 @@ module.exports = {
output: {
path: exportPath,
publicPath: 'build/',
filename: appName
filename: '[name].bundle.js',
chunkFilename: '[name].bundle.js'
},
module: {
loaders: [{
@@ -65,7 +62,8 @@ module.exports = {
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['es2015']
presets: ['es2015'],
plugins: ['syntax-dynamic-import']
}
}]
},