Skip to content

Commit edba721

Browse files
committed
Added Webpack configuration to pass '*.es' files through Babel and plugin 'env', but not through 'react'. This extension will be used in this project for all EcmaScript that is > ES5.
1 parent 0a28072 commit edba721

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

webpack.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ module.exports = {
1010
path.join(__dirname, 'webpack_in', 'entry.jsx')],
1111
module: {
1212
rules: [{
13+
test: /\.es$/,
14+
use: [{
15+
loader: 'babel-loader',
16+
options: {
17+
presets: ['env'],
18+
plugins: ['transform-object-rest-spread']
19+
}
20+
}]
21+
}, {
1322
test: /\.jsx$/,
1423
use: [{
1524
loader: 'babel-loader',

0 commit comments

Comments
 (0)