Skip to content

Commit

Permalink
fix(babel-preset-gatsby-package): apply "corejs" only to non-browser …
Browse files Browse the repository at this point in the history
…target (#17727)

* Fix error when building gatsby-transformer-sqip

* Update snapshots

* Only add corejs for node
  • Loading branch information
sidharthachatterjee authored and GatsbyJS Bot committed Sep 20, 2019
1 parent b785583 commit 553a3a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -5,7 +5,6 @@ Array [
Array [
"@babel/preset-env",
Object {
"corejs": 2,
"debug": false,
"loose": true,
"modules": "commonjs",
Expand Down Expand Up @@ -35,7 +34,6 @@ Array [
Array [
"@babel/preset-env",
Object {
"corejs": 2,
"debug": true,
"loose": true,
"modules": "commonjs",
Expand Down Expand Up @@ -137,7 +135,6 @@ Array [
Array [
"@babel/preset-env",
Object {
"corejs": 2,
"debug": false,
"loose": true,
"modules": "commonjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset-gatsby-package/index.js
Expand Up @@ -17,6 +17,8 @@ function preset(context, options = {}) {
}

const nodeConfig = {
corejs: 2,
useBuiltIns: `entry`,
targets: {
node: IS_PRODUCTION ? nodeVersion : `current`,
},
Expand All @@ -28,10 +30,8 @@ function preset(context, options = {}) {
r(`@babel/preset-env`),
Object.assign(
{
corejs: 2,
loose: true,
debug: !!debug,
useBuiltIns: `entry`,
shippedProposals: true,
modules: `commonjs`,
},
Expand Down

0 comments on commit 553a3a5

Please sign in to comment.