salix/webpack.config.js

45 lines
716 B
JavaScript
Raw Normal View History

2016-09-29 05:10:58 +00:00
var webpack = require ('webpack');
var path = require ('path');
2016-09-29 05:10:58 +00:00
module.exports =
{
entry: {
'salix.app': ['@salix/app']
},
output: {
path: path.join(__dirname, 'build', 'public'),
2016-09-29 05:10:58 +00:00
filename: '[name].js',
publicPath: 'build/public/',
2016-10-05 06:08:36 +00:00
chunkFilename: "[name].js"
2016-09-29 05:10:58 +00:00
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
2016-10-06 09:18:02 +00:00
},{
test: /\.html$/,
loader: 'raw'
2016-10-06 09:18:02 +00:00
},{
test: /\.json$/,
loader: 'json'
2016-10-06 09:23:54 +00:00
},{
2016-10-06 07:20:57 +00:00
test: /\.css$/,
loader: 'style!css'
2016-09-29 05:10:58 +00:00
}
]
},
resolve: {
modulesDirectories: [
__dirname,
'node_modules'
]
},
devtool: 'cheap-module-eval-source-map' // 'source-map'
2016-09-29 05:10:58 +00:00
};