Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save a1exlism/501edd5748fe945abc099d3c0571cdc9 to your computer and use it in GitHub Desktop.
Save a1exlism/501edd5748fe945abc099d3c0571cdc9 to your computer and use it in GitHub Desktop.
/*
* Refer: https://github.com/ruanyf/webpack-demos
* demo 3
*/
module.exports = {
entry: './main.jsx',
output: {
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.jsx?$/, // file regexp match
exclude: /node_modules/, // exclude file/folder
use: {
loader: 'babel-loader',
options: {
presets: ['es2015', 'react']
}
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment