Skip to content

Instantly share code, notes, and snippets.

@chathurangat
Last active January 30, 2018 13:11
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 chathurangat/e262285011f35cd123070a3988cdc596 to your computer and use it in GitHub Desktop.
Save chathurangat/e262285011f35cd123070a3988cdc596 to your computer and use it in GitHub Desktop.
const path = require('path');
module.exports = {
entry: {
app: [
'babel-polyfill',
'./main.js'
]
},
output: {
path: path.resolve(__dirname, 'build'),
filename: 'app.bundle.js'
},
module: {
loaders: [{
// Only run `.js` and `.jsx` files through Babel
test: /\.js?$/,
//skip the files in the node_modules directory
exclude: /node_modules/,
loader: 'babel-loader',
// Options to configure the babel. here we have set up the preset. this can be replaced with .babelrc file
query: {
presets: ['env']
}
}]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment