-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Bug] Local version of webpack-virtual-modules in next-with-linaria #168
Comments
From the description I didn't understand neither why is the webpack-virtual-modules have bug nor where is the bug in the behavior or how to reproduce it? It is on the reporter to prove that the project has bug and submit a valid minimal reproducible bug report. |
@larixer thank you for the quick response! I apologised that this report is a bit unconventional - it is about another repository that is using I would like to apologise again for not being clear. I have created two demo repositories using next.js 13 and yarn 3 zero install to be able to reproduce this issue as easily as possible: https://github.com/ramblehead/nextjs-tw-linaria When running
All above changes are reflected via hot reload as expected and linaria updates are using When running
Changes to Please, let me know if any further information is required to reproduce this issue or if this is a wrong place to report it. |
@ramblehead I understand. For the bug report to be reproducible is a necessary requirement, but not the only requirement. There is another requirement, that the reproduction should be minimal, and not in the sense of minimal number of commands to execute, but rather it should involve minimal number of components involved and including |
Hi! Apologies for a bit unconventional bug report.
I came to this repository when trying to debug the following issue in next-with-linaria project:
dlehmhus/next-with-linaria#19
The author of next-with-linaria @dlehmhus decided to include a patched version of webpack-virtual-modules into their repository. The patch is the following:
https://github.com/dlehmhus/next-with-linaria/blob/62f4603fa8ce8d723749152615ec6c684b3cd45a/src/plugins/webpack-virtual-modules/index.ts#L120
I do not fully understand how webpack-virtual-modules work and cannot tell if this patch is legitimate. If it is legitimate, would it be possible to add an optional parameter to VirtualModulesPlugin constructor or writeModule member function to switch between "throw new Error(
Plugin has not been initialized
);" and next-with-linaria patch behaviours. So, the author of next-with-linaria can just add webpack-virtual-modules to the packages instead of including the whole source code?Also, I would be grateful if someone more knowledgeable could take a look at the next-with-linaria issue 19 mentioned above. It is quite puzzling to me why removing the following code in webpack-virtual-modules fixes that issue (at least from the user interface point of view):
webpack-virtual-modules/src/index.ts
Line 244 in 7517967
The text was updated successfully, but these errors were encountered: