Skip to content

Commit

Permalink
chore(build-config): tweak Babel config
Browse files Browse the repository at this point in the history
  • Loading branch information
dmbch committed Feb 19, 2018
1 parent 75e8eae commit 9e1f6e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/build-config/sections/module-rules/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function getBabelLoader(targets, plugins) {
use: {
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
compact: process.env.NODE_ENV === 'production',
cacheDirectory: true,
cacheIdentifier: createIdentifier(targets),
presets: [
Expand All @@ -29,7 +31,7 @@ function getBabelLoader(targets, plugins) {
],
'react',
],
plugins: [].concat(plugins || [], [
plugins: [].concat(plugins, [
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-object-rest-spread'),
]),
Expand Down

0 comments on commit 9e1f6e1

Please sign in to comment.