Skip to content

Commit aac36d2

Browse files
authored
document globalOptions
`globalOptions` is useful when a babel plugin needs non-serializable options (such as functions, callbacks), thus it's worth mentioning in the README.
1 parent e9e3702 commit aac36d2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,23 @@ module: {
8080
]
8181
}
8282
```
83+
84+
or by using global options:
85+
86+
```javascript
87+
module: {
88+
loaders: [
89+
{
90+
test: /\.js$/,
91+
exclude: /(node_modules|bower_components)/,
92+
loader: 'babel-loader'
93+
}
94+
]
95+
},
96+
babel: {
97+
presets: ['es2015']
98+
}
99+
```
83100

84101
This loader also supports the following loader-specific option:
85102

0 commit comments

Comments
 (0)