Skip to content

Commit

Permalink
fix: Browser (UMD) build now bundles corejs (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmit authored Sep 7, 2018
1 parent 47d673e commit ec62fc0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions build-scripts/rollup.browser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export default function createBrowserConfig(options = {}, targets) {
plugins: [
alias(lerna()),
json(),
resolve({ browser: true }),
resolve({ browser: true, preferBuiltins: true }),
commonjs(),
babel({
babelrc: false,
runtimeHelpers: true,
exclude: '../../../node_modules/**',
exclude: ['../../../node_modules/**'],
presets: [
[
'@babel/preset-env',
Expand All @@ -37,7 +37,7 @@ export default function createBrowserConfig(options = {}, targets) {
],
plugins: [
'@babel/plugin-external-helpers',
'@babel/plugin-transform-runtime',
['@babel/plugin-transform-runtime', { corejs: 2 }],
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }]
]
}),
Expand Down
6 changes: 3 additions & 3 deletions build-scripts/rollup.node.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ export default function createNodeConfig(options = {}) {
external,
plugins: [
json(),
resolve(),
resolve({ preferBuiltins: true }),
commonjs(),
babel({
babelrc: false,
runtimeHelpers: true,
exclude: '../../../node_modules/**',
exclude: ['../../../node_modules/**'],
presets: [
[
'@babel/preset-env',
{
modules: false,
targets: {
node: 6
node: '6.0.0'
}
}
]
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@babel/runtime-corejs2": "^7.0.0",
"@commitlint/cli": "^7.0.0",
"@commitlint/config-conventional": "^7.0.1",
"@commitlint/config-lerna-scopes": "^7.0.0",
Expand Down Expand Up @@ -80,8 +81,5 @@
"rollup-plugin-terser": "^2.0.2",
"tap-merge": "^0.3.1",
"testem": "^2.10.0"
},
"dependencies": {
"@babel/runtime-corejs2": "^7.0.0"
}
}

0 comments on commit ec62fc0

Please sign in to comment.