Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const webpack = require('webpack')
- module.exports = {
- devtool: 'source-map',
- entry: [
- 'babel-polyfill',
- './public/src/index',
- ],
- module: {
- loaders: [
- {test: /.json$/, loader: 'json-loader'},
- {test: /.jsx?$/, loader: 'babel-loader', exclude: /node_modules/},
- {test: /\.css$/, loaders: ['style-loader', 'css-loader']}
- ],
- },
- output: {
- filename: 'bundle.js',
- path: `${__dirname}/public/dist/`,
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': {
- NODE_ENV: '"production"',
- },
- }),
- new webpack.IgnorePlugin(/regenerator|nodent|js-beautify/, /ajv/),
- new webpack.optimize.OccurrenceOrderPlugin(),
- new webpack.optimize.UglifyJsPlugin({
- compress: {
- warnings: false,
- },
- dead_code: true,
- minimize: true,
- }),
- ],
- resolve: {
- extensions: [
- '.js',
- '.json',
- '.jsx',
- ],
- },
- externals: [
- {'./cptable': 'var cptable'},
- {'../xlsx.js': 'var _XLSX'}
- ],
- }
Add Comment
Please, Sign In to add comment