Skip to content

Commit

Permalink
Merge branch 'canary' into update/trace-external-resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 28, 2021
2 parents bc36393 + 7902616 commit 7a23d53
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/api-reference/next.config.js/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {
},
],
},
],
]
},
}
```
Expand All @@ -109,7 +109,7 @@ module.exports = {
},
],
},
],
]
},
}
```
Expand All @@ -135,7 +135,7 @@ module.exports = {
},
],
},
],
]
},
}
```
Expand All @@ -157,7 +157,7 @@ module.exports = {
},
],
},
],
]
},
}
```
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/swc/src/styled_jsx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ impl StyledJSXTransformer {
let placeholder = if i == quasis.len() - 1 {
String::new()
} else {
format!("__styled-jsx-placeholder__{}", i)
format!("__styled-jsx-placeholder-{}__", i)
};
s = format!("{}{}{}", s, quasis[i].raw.value, placeholder)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/next/build/swc/src/styled_jsx/transform_css.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ pub fn transform_css(
return Ok(string_literal_expr(&s));
}

let mut parts: Vec<&str> = s.split("__styled-jsx-placeholder__").collect();
let mut parts: Vec<&str> = s.split("__styled-jsx-placeholder-").collect();
let mut final_expressions = vec![];
for i in 1..parts.len() {
let (num_len, expression_index) = read_number(&parts[i]);
final_expressions.push(style_info.expressions[expression_index].clone());
let substr = &parts[i][num_len..];
let substr = &parts[i][(num_len + 2)..];
parts[i] = substr;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Link from "next/link";

export default function IndexPage() {
return (
<div>
Hello World.{" "}
<Link href="/about">
<a>Abound</a>
</Link>
<style jsx>{`
a {
color: ${"#abcdef"}12;
}
`}</style>
</div>
);
}
Loading

0 comments on commit 7a23d53

Please sign in to comment.