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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for styleModule #629

Merged
merged 2 commits into from
May 14, 2020
Merged

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Apr 8, 2020

This PR adds support for the styleModule configuration, a way to change the (currently hardcoded) module that gets imported during the styled-jsx transpilation.

Part 1 of vercel/next.js#10149

@arcanis arcanis requested a review from giuseppeg as a code owner April 8, 2020 09:37
@giuseppeg
Copy link
Collaborator

@arcanis thanks for the PR! Looking at the issue I wonder if this could be fixed in Next.js by rewriting the import declaration source with a Babel plugin so that it points to the right module or with a webpack alias?

@arcanis
Copy link
Contributor Author

arcanis commented Apr 8, 2020

I think idiomatically the 'right' path should be configurable by the transforms themselves - this is for example what transform-runtime does (kinda) with absoluteRuntime which instructs it to use the absolute path rather than the regular package name. In our case I think it's better for portability to avoid absolute paths and use the Next.js package name instead.

@giuseppeg giuseppeg merged commit e025679 into vercel:master May 14, 2020
@giuseppeg
Copy link
Collaborator

Thank you @arcanis and sorry for the delay! I'll release a minor version

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

Successfully merging this pull request may close these issues.

2 participants