mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-10 09:52:18 +02:00
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
var path = require('path');
|
|
var webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
devtool: 'cheap-module-source-map',
|
|
entry: [
|
|
'./assets/scripts/src/choices'
|
|
],
|
|
output: {
|
|
path: path.join(__dirname, '/assets/scripts/dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/assets/scripts/dist/'
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
sourceMap: false,
|
|
mangle: true,
|
|
output: {
|
|
comments: false
|
|
},
|
|
compress: {
|
|
warnings: false,
|
|
screw_ie8: true
|
|
}
|
|
}),
|
|
new webpack.DefinePlugin({
|
|
'process.env': {
|
|
// This has effect on the react lib size
|
|
'NODE_ENV': JSON.stringify('production'),
|
|
}
|
|
}),
|
|
],
|
|
module: {
|
|
loaders: [{
|
|
test: /\.js$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
loaders: ['babel'],
|
|
include: path.join(__dirname, 'assets/scripts/src')
|
|
}]
|
|
}
|
|
}; |