Skip to content

Instantly share code, notes, and snippets.

@arackaf
Created February 14, 2017 05:39
Show Gist options
  • Select an option

  • Save arackaf/46dd5a89bd5895efa35e8ca4a2bf3f8b to your computer and use it in GitHub Desktop.

Select an option

Save arackaf/46dd5a89bd5895efa35e8ca4a2bf3f8b to your computer and use it in GitHub Desktop.
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './reactStartup.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
alias: {
'simple-react-bootstrap': 'node_modules/simple-react-bootstrap/dist/simple-react-bootstrap.js',
'jscolor': 'util/jscolor.js'
},
modules: [
path.resolve('./'),
path.resolve('./node_modules'),
]
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
}
]
},
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static'
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment