Last active
March 1, 2018 15:46
-
-
Save a1exlism/501edd5748fe945abc099d3c0571cdc9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* 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