Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 <style jsx> #1

Closed
thiskevinwang opened this issue Jan 7, 2022 · 5 comments
Closed

馃悰 <style jsx> #1

thiskevinwang opened this issue Jan 7, 2022 · 5 comments

Comments

@thiskevinwang
Copy link
Contributor

Observed

Example in Container

styled-jsx usage

      <style jsx>{`
        .geist-container > :global(*) {
          --gap-ratio: ${gap};
        }
      `}</style>

incorrectly results in a plain style dom tag
image

Expected

This doesn't work in the local docs site. It should behave like how it does for https://thekevinwang.com/design/grid/

@thiskevinwang
Copy link
Contributor Author

@thiskevinwang
Copy link
Contributor Author

vercel/next.js#30174

@thiskevinwang
Copy link
Contributor Author

Update 1

An option is to use babel with next/babel to transpile everything.

  "devDependencies": {
+    "@babel/cli": "^7.16.7",
+    "@babel/core": "^7.16.7",
babel src --extensions '.ts','.tsx' --copy-files -d dist --ignore '**/*.test.*' && npx tsc
// .babelrc
{
  "presets": [
    [
      "next/babel",
      {
        "preset-env": {},
        "transform-runtime": {},
        "styled-jsx": {},
        "class-properties": {}
      }
    ]
  ],
  "plugins": []
}

@thiskevinwang
Copy link
Contributor Author

temporarily fixed by #3

Though SWC will not be used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant