Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(babel-preset-gatsby): Ensure the spread operator works correctly on Sets #15172

Merged
merged 2 commits into from Jul 12, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/babel-preset-gatsby/src/__tests__/index.js
Expand Up @@ -44,6 +44,12 @@ it(`Specifies proper presets and plugins for test stage`, () => {
regenerator: true,
},
],
[
expect.stringContaining(path.join(`@babel`, `plugin-transform-spread`)),
{
loose: false,
},
],
])
})

Expand Down Expand Up @@ -99,6 +105,12 @@ it(`Specifies proper presets and plugins for build-html stage`, () => {
regenerator: true,
},
],
[
expect.stringContaining(path.join(`@babel`, `plugin-transform-spread`)),
{
loose: false,
},
],
])
})

Expand Down
6 changes: 6 additions & 0 deletions packages/babel-preset-gatsby/src/index.js
Expand Up @@ -77,6 +77,12 @@ module.exports = function preset(_, options = {}) {
regenerator: true,
},
],
[
resolve(`@babel/plugin-transform-spread`),
{
loose: false, // Fixes #14848
},
],
],
}
}