7a09f88d14
When using pnpm / yarnPnP to install next.js, styled-jsx as dependency is not hoisted in the top level node_modules, it will fail when nodejs is trying to resolve `styled-jsx/style` from project directory. Re-export `styled-jsx/style` in next.js and let swc/babel plugin compile the import path it to `next/dist/shared/lib/styled-jsx` Resolves #10149 Closes #21320 Closes #9325 Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
12 lines
336 B
JavaScript
12 lines
336 B
JavaScript
import _JSXStyle from "next/dist/shared/lib/styled-jsx";
|
|
export default function IndexPage() {
|
|
return <div className={"jsx-bbdada4ef17d18ef"}>
|
|
|
|
<h1 className={"jsx-bbdada4ef17d18ef"}>Hello World.</h1>
|
|
|
|
|
|
|
|
<_JSXStyle id={"bbdada4ef17d18ef"}>{"@supports(display:flex){h1{color:hotpink}}"}</_JSXStyle>
|
|
|
|
</div>;
|
|
};
|