2016-04-18 17:20:30 -04:00
|
|
|
var webpack = require('webpack');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
|
|
|
'vm': './src/index.js',
|
2016-09-13 17:49:45 -04:00
|
|
|
'vm.min': './src/index.js'
|
2016-04-18 17:20:30 -04:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: __dirname,
|
|
|
|
filename: '[name].js'
|
|
|
|
},
|
2016-04-26 09:49:52 -04:00
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.json$/,
|
|
|
|
loader: 'json-loader'
|
2016-09-20 10:29:47 -04:00
|
|
|
}, {
|
|
|
|
test: require.resolve('./src/index.js'),
|
|
|
|
loader: 'expose?VirtualMachine'
|
2016-04-26 09:49:52 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-04-18 17:20:30 -04:00
|
|
|
plugins: [
|
|
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
|
|
include: /\.min\.js$/,
|
2016-04-26 09:49:52 -04:00
|
|
|
minimize: true,
|
|
|
|
compress: {
|
|
|
|
warnings: false
|
|
|
|
}
|
2016-04-18 17:20:30 -04:00
|
|
|
})
|
|
|
|
]
|
|
|
|
};
|