-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into 11-15-tweak_cache_revalidate_fetch_warning
- Loading branch information
Showing
17 changed files
with
272 additions
and
22 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
11 changes: 11 additions & 0 deletions
11
...t-swc/crates/core/tests/fixture/next-dynamic-app-dir/no-ssr/output-server-client-layer.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import dynamic from 'next/dynamic'; | ||
export const NextDynamicNoSSRServerComponent = dynamic(async ()=>{ | ||
typeof require.resolveWeak !== "undefined" && require.resolveWeak("../text-dynamic-no-ssr-server"); | ||
}, { | ||
loadableGenerated: { | ||
modules: [ | ||
"some-file.js -> " + "../text-dynamic-no-ssr-server" | ||
] | ||
}, | ||
ssr: false | ||
}); |
4 changes: 3 additions & 1 deletion
4
packages/next-swc/crates/core/tests/fixture/next-dynamic/issue-48098/output-server.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
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
4 changes: 3 additions & 1 deletion
4
packages/next-swc/crates/core/tests/fixture/next-dynamic/wrapped-import/output-server.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use client' | ||
|
||
import dynamic from 'next/dynamic' | ||
|
||
const DynamicComponent = dynamic( | ||
() => import('../csr').then((mod) => mod.CSR), | ||
{ | ||
ssr: false, | ||
} | ||
) | ||
|
||
export default function Client() { | ||
return ( | ||
<div> | ||
<DynamicComponent /> | ||
</div> | ||
) | ||
} | ||
|
||
export const runtime = 'edge' |
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
5 changes: 5 additions & 0 deletions
5
test/e2e/app-dir/dynamic/app/dynamic-mixed-ssr-false/client-edge/page.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use client' | ||
|
||
export { default } from '../dynamic-import' | ||
|
||
export const runtime = 'edge' |
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/dynamic/app/dynamic-mixed-ssr-false/client/page.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use client' | ||
|
||
export { default } from '../dynamic-import' |
14 changes: 14 additions & 0 deletions
14
test/e2e/app-dir/dynamic/app/dynamic-mixed-ssr-false/dynamic-import.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import dynamic from 'next/dynamic' | ||
|
||
const DynamicSSRFalse = dynamic(() => import('./ssr-false-module'), { | ||
ssr: false, | ||
}) | ||
|
||
export default function page() { | ||
return ( | ||
<div> | ||
<DynamicSSRFalse /> | ||
<p id="content">dynamic-mixed-ssr-false</p> | ||
</div> | ||
) | ||
} |
11 changes: 11 additions & 0 deletions
11
test/e2e/app-dir/dynamic/app/dynamic-mixed-ssr-false/ssr-false-module/index.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Client from './ssr-false-client' | ||
import Server from './ssr-false-server' | ||
|
||
export default function Comp() { | ||
return ( | ||
<> | ||
<Client /> | ||
<Server /> | ||
</> | ||
) | ||
} |
5 changes: 5 additions & 0 deletions
5
test/e2e/app-dir/dynamic/app/dynamic-mixed-ssr-false/ssr-false-module/ssr-false-client.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use client' | ||
|
||
export default function Comp() { | ||
return <p id="ssr-false-client-module">ssr-false-client-module-text</p> | ||
} |
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/dynamic/app/dynamic-mixed-ssr-false/ssr-false-module/ssr-false-server.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Comp() { | ||
return <p id="ssr-false-server-module">ssr-false-server-module-text</p> | ||
} |
Oops, something went wrong.