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
Webpack 5 support #681
Comments
Hi @arendjr |
The PR with migration to monorepo #687 |
Webpack 5 loader has been published ( |
Awesome! I just tried upgrading, and indeed I'm running into an issue:
This is due to PnP indeed, the last line described the issue pretty clearly. I think it should be easily fixable, but it probably requires some careful scanning that since the monorepo migration there are no undocumented dependencies between packages. I didn't get this error with Linaria 2, which actually makes me a little bit hopeful. It's still possible once the above is fixed that the original |
Yep, |
Does |
Only |
Oh, you mean that's what I should do as a user? I think what Yarn is telling us is that it's the responsibility of the
|
I think this is also related to #700 . |
It's a tricky part. Since |
Alright. I might suggest not using it as a default then, if it requires a package you don't want to force users to install. That said, I've got everything working with Webpack 5 and PnP now. And Linaria components referencing each other across files works as well now. So I'm all happy! Thanks so much! |
Describe the enhancement
Webpack 5 was released recently. It would be nice if Linaria supports it out-of-the-box.
Motivation
I have a project that is based on Webpack 4 which also uses Yarn PnP. I'm running into issues there with Linaria as soon as modules containing Linaria tags use imports from other modules. I have tracked this down to
enhanced-resolve
and I suspect it could be related to #658 as Yarn PnP requires some plugins to work with Webpack 4.However, Webpack 5 and enhanced-resolve 5 (which go hand-in-hand) support Yarn PnP out-of-the-box. I believe once Linaria supports these, everything should "just work".
Possible implementations
A first step would be upgrading to
enhanced-resolve@5
. I don't know which other steps are necessary.Related Issues
The text was updated successfully, but these errors were encountered: