salix/webpack.config.js

49 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-09-29 05:10:58 +00:00
2016-10-07 08:13:03 +00:00
// var webpack = require('webpack');
var path = require('path');
2016-09-29 05:10:58 +00:00
module.exports =
{
2016-10-07 08:13:03 +00:00
entry: {
2016-11-04 10:03:40 +00:00
'salix.app': ['@salix/app'],
'salix.login': ['@salix/login']
2016-10-07 08:13:03 +00:00
},
output: {
2016-10-07 10:08:26 +00:00
path: path.join(__dirname, 'build', 'public'),
2016-10-07 08:13:03 +00:00
filename: '[name].js',
2016-10-07 10:08:26 +00:00
publicPath: 'build/public/',
2016-10-07 08:13:03 +00:00
chunkFilename: "[name].js"
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
2016-11-03 14:36:33 +00:00
},{
2016-10-07 08:13:03 +00:00
test: /\.html$/,
loader: 'raw'
2016-11-03 14:36:33 +00:00
},{
2016-10-07 08:13:03 +00:00
test: /\.json$/,
loader: 'json'
2016-11-03 14:36:33 +00:00
},{
2016-10-07 08:13:03 +00:00
test: /\.css$/,
loader: 'style!css'
2016-11-03 14:36:33 +00:00
},{
test: /\.scss$/,
loader: 'style!css!sass'
2016-10-07 08:13:03 +00:00
}
]
},
resolve: {
modulesDirectories: [
__dirname,
'node_modules'
]
2016-10-07 10:08:26 +00:00
},
devtool: 'cheap-module-eval-source-map' // 'source-map'
2016-09-29 05:10:58 +00:00
};