Last active
January 30, 2018 13:11
-
-
Save chathurangat/e262285011f35cd123070a3988cdc596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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