mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
46 lines
998 B
JavaScript
46 lines
998 B
JavaScript
import webpack from 'webpack';
|
|
|
|
module.exports = {
|
|
devtool: 'source-map',
|
|
externals: [{
|
|
'react': {
|
|
root: 'React',
|
|
commonjs2: 'react',
|
|
commonjs: 'react',
|
|
amd: 'react'
|
|
}
|
|
}, {
|
|
'react-dom': {
|
|
root: 'ReactDOM',
|
|
commonjs2: 'react-dom',
|
|
commonjs: 'react-dom',
|
|
amd: 'react-dom'
|
|
}
|
|
}],
|
|
module: {
|
|
rules: [{
|
|
enforce: 'pre',
|
|
test: /\.js?$/,
|
|
exclude: /node_modules/,
|
|
loader: 'eslint-loader'
|
|
}, {
|
|
test: /\.js?$/,
|
|
use: ['babel-loader'],
|
|
exclude: /node_modules/
|
|
}]
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
'process.env.NODE_ENV': JSON.stringify('production')
|
|
}),
|
|
new webpack.SourceMapDevToolPlugin(),
|
|
new webpack.optimize.DedupePlugin(),
|
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
|
new webpack.optimize.AggressiveMergingPlugin(),
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
include: /\.min\.js$/,
|
|
compress: { warnings: false }
|
|
})
|
|
]
|
|
};
|