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