Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cli/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require('babel/register');
require('babel/register')(require('../optimize/babelOptions'));
require('./cli');
13 changes: 4 additions & 9 deletions src/optimize/BaseOptimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let utils = require('requirefrom')('src/utils');
let fromRoot = utils('fromRoot');
let OptmzBundles = require('./OptmzBundles');
let OptmzUiModules = require('./OptmzUiModules');
let babelOptions = require('./babelOptions');

let kbnTag = `Kibana ${ utils('packageJson').version }`;

Expand Down Expand Up @@ -75,22 +76,16 @@ class BaseOptimizer extends EventEmitter {
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
optional: ['runtime'],
stage: 1,
nonStandard: false
}
query: babelOptions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonStandard: false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, updated.

},
{
// explicitly require .jsx extension to support jsx
test: /\.jsx$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
optional: ['runtime'],
stage: 1,
query: _.defaults({
nonStandard: true
}
}, babelOptions)
}
].concat(this.modules.loaders),
noParse: this.modules.noParse,
Expand Down
5 changes: 5 additions & 0 deletions src/optimize/babelOptions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
optional: ['runtime'],
stage: 1,
nonStandard: false
};