Skip to content

Commit

Permalink
Babel 7 (twbs#23966)
Browse files Browse the repository at this point in the history
* use .babelrc.js, compile bundled/non-bundled with loose mode

* add back helper, exclude typeof transform
  • Loading branch information
hzoo authored and Johann-S committed Sep 17, 2017
1 parent 5cec8e0 commit f17b165
Show file tree
Hide file tree
Showing 5 changed files with 1,746 additions and 743 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

16 changes: 16 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
presets: [
[
'env',
{
loose: true,
modules: false,
exclude: ['transform-es2015-typeof-symbol']
}
]
],
plugins: [
process.env.ROLLUP && 'external-helpers',
process.env.PLUGINS && 'transform-es2015-modules-strip',
].filter(Boolean)
};
6 changes: 2 additions & 4 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ const plugins = [
babel({
exclude: 'node_modules/**', // only transpile our source code
externalHelpersWhitelist: [ // include only required helpers
'typeof',
'classCallCheck',
'defineProperties',
'createClass',
'inherits',
'possibleConstructorReturn'
'inheritsLoose'
]
})
]
Expand Down
Loading

0 comments on commit f17b165

Please sign in to comment.