Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
81c5511b
Unverified
Commit
81c5511b
authored
Sep 16, 2021
by
강동윤
Committed by
GitHub
Sep 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
next-ssg: Don't inject `__N_SSP` for files without server props. (#29141)
parent
10daef96
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
Cargo.toml
packages/next/build/swc/Cargo.toml
+1
-1
next_ssg.rs
packages/next/build/swc/src/next_ssg.rs
+4
-1
input.js
...ld/swc/tests/fixture/ssg/getStaticProps/no-props/input.js
+3
-0
output.js
...d/swc/tests/fixture/ssg/getStaticProps/no-props/output.js
+3
-0
No files found.
packages/next/build/swc/Cargo.toml
View file @
81c5511b
...
@@ -27,7 +27,7 @@ swc_node_base = "0.3"
...
@@ -27,7 +27,7 @@ swc_node_base = "0.3"
swc_stylis
=
"0.3"
swc_stylis
=
"0.3"
fxhash
=
"0.2.1"
fxhash
=
"0.2.1"
retain_mut
=
"0.1.3"
retain_mut
=
"0.1.3"
log
=
"0.4.14"
log
=
{version=
"0.4.14"
,
features
=
["release_max_level_off"]
}
pathdiff
=
"0.2.0"
pathdiff
=
"0.2.0"
...
...
packages/next/build/swc/src/next_ssg.rs
View file @
81c5511b
...
@@ -402,7 +402,10 @@ impl Fold for NextSsg {
...
@@ -402,7 +402,10 @@ impl Fold for NextSsg {
_
=>
true
,
_
=>
true
,
});
});
if
!
self
.state.done
&&
!
self
.state.should_run_again
{
if
!
self
.state.done
&&
!
self
.state.should_run_again
&&
(
self
.state.is_prerenderer
||
self
.state.is_server_props
)
{
self
.state.done
=
true
;
self
.state.done
=
true
;
if
items
.iter
()
.any
(|
s
|
s
.is_module_decl
())
{
if
items
.iter
()
.any
(|
s
|
s
.is_module_decl
())
{
...
...
packages/next/build/swc/tests/fixture/ssg/getStaticProps/no-props/input.js
0 → 100644
View file @
81c5511b
export
default
function
Home
()
{
return
<
h1
>
Hello
World
!<
/h1
>
}
\ No newline at end of file
packages/next/build/swc/tests/fixture/ssg/getStaticProps/no-props/output.js
0 → 100644
View file @
81c5511b
export
default
function
Home
()
{
return
__jsx
(
"h1"
,
null
,
"Hello World!"
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment