regexper-static/webpack.config.js

50 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-10-15 17:16:13 +00:00
var webpack = require('webpack'),
bourbon = require('bourbon');
module.exports = {
devtool: 'source-map',
entry: {
2016-10-15 17:16:13 +00:00
'js/main.js': './src/js/main.js',
2016-10-15 20:51:43 +00:00
'__discard__/css/main.css.js': './src/sass/main.scss',
'__discard__/css/svg.css.js': './src/sass/svg.scss'
},
output: {
path: __dirname + '/build',
filename: '[name]'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
2017-07-29 20:18:52 +00:00
loader: 'babel-loader'
},
{
test: require.resolve('snapsvg'),
loader: 'imports-loader?this=>window,fix=>module.exports=0'
},
{
test: /\.peg$/,
2016-10-15 20:51:43 +00:00
loader: require.resolve('./lib/canopy-loader')
2016-10-15 17:16:13 +00:00
},
{
test: /\.scss$/,
exclude: /node_modules/,
2017-07-29 20:18:52 +00:00
loaders: [
'file-loader?name=css/[name].css',
'extract-loader',
'css-loader',
'sass-loader?includePaths[]=' + bourbon.includePaths
]
}
]
}
};