-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update partial hydration directive (#36868)
* chore: Update client directive to "use client" * Bump react-server-dom-webpack * Adjust react-server-dom-webpack import paths * Revert everything except directive change
- Loading branch information
Showing
18 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/cjs-exports.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"client export" | ||
"use client" | ||
|
||
exports.a = { | ||
b: 1 | ||
|
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/cjs-module-exports.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-aggregation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-declaration.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"client export" | ||
"use client" | ||
|
||
export let a, b | ||
export var c, d | ||
|
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-default-class-anonymous.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"client export" | ||
"use client" | ||
|
||
export default class {} |
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-default-class-named.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"client export" | ||
"use client" | ||
|
||
export default class ClassName {} |
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-default-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"client export" | ||
"use client" | ||
|
||
const a = 1 | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ges/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-default-function-anonymous.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"client export" | ||
"use client" | ||
|
||
export default function () {} |
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-default-function-named.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"client export" | ||
"use client" | ||
|
||
export default function functionName() {} |
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/esm-list.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"client export" | ||
"use client" | ||
|
||
const a = 1, b = 2, c = 3 | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/no-client-export-no-export.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
function noClientExport() { | ||
return `No "client export" found in this file, and the function itself is not exported` | ||
return `No "use client" found in this file, and the function itself is not exported` | ||
} |
2 changes: 1 addition & 1 deletion
2
packages/gatsby/src/utils/webpack/loaders/__tests__/fixtures/no-client-export.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export function noClientExport() { | ||
return `No "client export" found in this file` | ||
return `No "use client" found in this file` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters