Skip to content

Instantly share code, notes, and snippets.

@dhruvdutt
Created February 20, 2018 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhruvdutt/d66526c8a3d6778328781f88ced6fc54 to your computer and use it in GitHub Desktop.
Save dhruvdutt/d66526c8a3d6778328781f88ced6fc54 to your computer and use it in GitHub Desktop.
{
"presets": [
[
"env", {
"targets": {
"browsers": ["last 2 versions", "safari >= 7"]
},
"modules": false,
"loose": true
}
],
"react"
],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread"
]
}
const path = require('path');
const ShakePlugin = require('webpack-common-shake').Plugin;
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: {
main: './index.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
publicPath: 'dist/',
},
module: {
rules: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /.css?$/,
loader: ['style-loader', 'css-loader'],
exclude: /node_modules/,
},
],
},
plugins: [
new ShakePlugin()
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment