Update webpack.md

master
Matt Huntington 8 years ago committed by GitHub
parent 32c802296b
commit dc1df4f3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -335,3 +335,30 @@ and it will open up your browser automatically. Change a file, and see it reloa
```
rm -r dist
```
Change your script tag to be
```html
<script src="main.js" charset="utf-8"></script>
```
And take out the `output` property in webpack.config.js
```javascript
module.exports = {
entry: './js/index.js',
module: {
rules: [
{
test: /\.(js|jsx)$/, //for all files that end with js/jsx
use: {
loader: 'babel-loader', //use the babel loader to load:
options: {
presets: ["es2015", "react"] //the es2015 compiler
}
}
}
]
}
};
```

Loading…
Cancel
Save