Skip to content

Instantly share code, notes, and snippets.

@mustmodify
Created October 8, 2018 14:42
Show Gist options
  • Save mustmodify/e5bf8756990aae8cc28983b0ba681bc2 to your computer and use it in GitHub Desktop.
Save mustmodify/e5bf8756990aae8cc28983b0ba681bc2 to your computer and use it in GitHub Desktop.
const config = {
entry: [
'es5-shim/es5-shim',
'es5-shim/es5-sham',
'babel-polyfill',
'./app/bundles/SAW/startup/registration',
],
output: {
filename: 'webpack-bundle.js',
path: pathLib.resolve(__dirname, '../app/assets/webpack'),
},
resolve: {
extensions: ['.js', '.jsx'],
alias: {
Reducers: path.resolve(__dirname, 'app/bundles/SAW/reducers')
}
},
plugins: [
new webpack.EnvironmentPlugin({ NODE_ENV: 'development' }),
],
module: {
rules: [
{
test: require.resolve('react'),
use: {
loader: 'imports-loader',
options: {
shim: 'es5-shim/es5-shim',
sham: 'es5-shim/es5-sham',
}
},
},
{
test: /\.jsx?$/,
use: 'babel-loader',
exclude: /node_modules/,
},
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment