Unverified Commit 81c5511b authored by 강동윤's avatar 강동윤 Committed by GitHub

next-ssg: Don't inject `__N_SSP` for files without server props. (#29141)

parent 10daef96
...@@ -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"
......
...@@ -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()) {
......
export default function Home() {
return <h1>Hello World!</h1>
}
\ No newline at end of file
export default function Home() {
return __jsx("h1", null, "Hello World!");
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment