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
Currently, when opting into the SWC Emotion plugin, there is an assumption made that the jsxImportSource is @emotion/react. This prevents projects that use Emotion 10 from being able to use SWC, because the package which provides the JSX runtime is called @emotion/core.
Describe the solution you'd like
I have a couple suggestions for how to resolve this.
Allow the jsxImportSource from jsConfig.compilerOptions to be used, if present
Allow a jsxImportSource to be specified as part of the emotion SWC options
Of these two suggestions, I think the first one is probably the better way to go, since its a little surprising that the jsxImportSource from jsConfig.compilerOptions is ignored if the nextConfig.experimental.emotion option is set
Describe alternatives you've considered
I'm not aware of another way to set the jsxImportSource to support @emotion/corewhile using the SWC Emotion plugin
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like to request
Currently, when opting into the SWC Emotion plugin, there is an assumption made that the
jsxImportSource
is@emotion/react
. This prevents projects that use Emotion 10 from being able to use SWC, because the package which provides the JSX runtime is called@emotion/core
.Describe the solution you'd like
I have a couple suggestions for how to resolve this.
jsxImportSource
fromjsConfig.compilerOptions
to be used, if presentjsxImportSource
to be specified as part of theemotion
SWC optionsOf these two suggestions, I think the first one is probably the better way to go, since its a little surprising that the
jsxImportSource
fromjsConfig.compilerOptions
is ignored if thenextConfig.experimental.emotion
option is setDescribe alternatives you've considered
I'm not aware of another way to set the
jsxImportSource
to support@emotion/core
while using the SWC Emotion pluginThe text was updated successfully, but these errors were encountered: