You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The styled-jsx/babel Babel plugin only processes import statements with the styled-jsx/css specifier, and does not process the equivalent require expressions for when styled-jsx is used within CJS scripts.
The problem location in the code where only import declarations are visited for processing is here:
If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar
styled-jsx should be usable within a CJS script, meaning the styled-jsx/babel Babel plugin should process require expressions with a styled-jsx/css path.
Environment (include versions)
styled-jsx (version): v3.3.2
Did this work in previous versions?
No.
The text was updated successfully, but these errors were encountered:
jaydenseric
added a commit
to jaydenseric/device-agnostic-ui
that referenced
this issue
Dec 23, 2020
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
The
styled-jsx/babel
Babel plugin only processesimport
statements with thestyled-jsx/css
specifier, and does not process the equivalentrequire
expressions for whenstyled-jsx
is used within CJS scripts.The problem location in the code where only import declarations are visited for processing is here:
styled-jsx/src/babel-external.js
Line 131 in eac1703
If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar
Working ESM:
Babel REPL.
Not working CJS:
Babel REPL.
What is the expected behavior?
styled-jsx
should be usable within a CJS script, meaning thestyled-jsx/babel
Babel plugin should processrequire
expressions with astyled-jsx/css
path.Environment (include versions)
Did this work in previous versions?
No.
The text was updated successfully, but these errors were encountered: