mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-21 17:24:14 -05:00
32 lines
619 B
JavaScript
32 lines
619 B
JavaScript
import webpack from 'webpack';
|
|
|
|
export default {
|
|
entry: `${__dirname}/src/index.js`,
|
|
output: {
|
|
path: `${__dirname}/build`,
|
|
publicPath: '/build/',
|
|
filename: 'bundle.js',
|
|
},
|
|
|
|
module: {
|
|
loaders: [
|
|
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel' },
|
|
],
|
|
},
|
|
|
|
resolve: {
|
|
extensions: ['', '.js', '.jsx'],
|
|
},
|
|
|
|
plugins: process.argv.indexOf('-p') === -1 ? null : [
|
|
new webpack.DefinePlugin({
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
}),
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
output: {
|
|
comments: false,
|
|
},
|
|
}),
|
|
],
|
|
};
|