docs: Clarifying babel/webpack docs (#1845)
This commit is contained in:
parent
482f0e71b9
commit
353bbe7fff
1 changed files with 3 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ npm install babel-core babel-loader babel-preset-es2015 babel-plugin-transform-r
|
|||
|
||||
Create a `.babelrc` file:
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [
|
||||
|
|
@ -130,6 +130,8 @@ module.exports = {
|
|||
}
|
||||
```
|
||||
|
||||
For those familiar with Webpack already, please note that adding the Babel options to the `babel-loader` section of your `webpack.config.js` will throw an error, so you need to include them in the separate `.babelrc` file.
|
||||
|
||||
This configuration assumes the source code file for the application entry point is in `src/index.js`, and this will output the bundle to `bin/app.js`.
|
||||
|
||||
To run the bundler, setup an npm script. Open `package.json` and add this entry under `"scripts"`:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue