You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
700 B
JavaScript
38 lines
700 B
JavaScript
const path = require('path');
|
|
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
name: 'minified',
|
|
devtool: 'source-map',
|
|
entry: './src/index.js',
|
|
output: {
|
|
filename: 'shuffle.min.js',
|
|
path: './dist',
|
|
library: 'shuffle',
|
|
libraryTarget: 'umd',
|
|
},
|
|
resolve: {
|
|
root: [path.resolve('./src')],
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel',
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.DedupePlugin(),
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
comments: false,
|
|
screw_ie8: true,
|
|
compress: {
|
|
drop_console: true,
|
|
},
|
|
mangle: true,
|
|
}),
|
|
],
|
|
};
|