Skip to content

Commit 7f38209

Browse files
JoviDeCroockgatsbybot
and
gatsbybot
authored
fix(gatsby-plugin-preact): use new babel plugin for better context compat (#26956)
* use new babel plugin for better context compat * Update gatsby-node.js * Update gatsby-node.js Co-authored-by: gatsbybot <[email protected]>
1 parent b7d76d3 commit 7f38209

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

packages/gatsby-plugin-preact/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"url": "https://github.com/gatsbyjs/gatsby/issues"
88
},
99
"dependencies": {
10-
"@prefresh/webpack": "^1.0.2",
11-
"react-refresh": "^0.8.2"
10+
"@prefresh/webpack": "^1.0.2"
1211
},
1312
"devDependencies": {
1413
"@babel/cli": "^7.11.6",

packages/gatsby-plugin-preact/src/__tests__/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe(`gatsby-plugin-preact`, () => {
3131
expect(getConfig).toHaveBeenCalledTimes(1)
3232
expect(actions.setBabelPlugin).toHaveBeenCalledTimes(1)
3333
expect(actions.setBabelPlugin).toHaveBeenCalledWith({
34-
name: `react-refresh/babel`,
34+
name: `@prefresh/babel-plugin`,
3535
})
3636
expect(actions.replaceWebpackConfig).toMatchInlineSnapshot(`
3737
[MockFunction] {

packages/gatsby-plugin-preact/src/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
2020
// enable react-refresh babel plugin to enable hooks
2121
// @see https://github.com/JoviDeCroock/prefresh/tree/master/packages/webpack#using-hooks
2222
actions.setBabelPlugin({
23-
name: `react-refresh/babel`,
23+
name: `@prefresh/babel-plugin`,
2424
})
2525
}
2626

0 commit comments

Comments
 (0)