-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
memory leak in webpack #15
Comments
Hey there! This has never happened to me, and it can depend on a number of things. If you have jit enabled, also try disabling it. Please provide further details, especially about your tailwind and build config, so I can investigate further. And possibly provide a repo to reproduce the issue. Thanks! |
@uurcank Is there any progress around this issue, or further details you can share? Otherwise I'll close this |
@jjranalli can you confirm whether you are compiling with webpack? I will work on it today and get back to you |
Sorry I think I misunderstood the issue at first. I generally use Tailwindcss with the standard Nextjs installation, so I'm not directly compiling Nightwind with webpack. I look forward to hearing what you discover about this. In the meantime feel free to share your webpack config (or a repo to reproduce the issue so I can look into this myself). Thanks! |
I tried with a couple of different webpack configs and all lead to the same memory error. I am not exactly sure what is the root for this. There must be some sort of infinite loop happening somewhere. How does this library work? Does it generate a stylesheet nested under dark class and inject that stylesheet? If not that would be a better approach and minimize the size of library. |
Nightwind classes aren't currently nested under a 'dark' class, each one is being injected separately using the addComponents function provided by Tailwindcss. This behaviour will change in the next major release of the plugin which will introduce a bunch of improvements , including how css rules are generated. Do you think that's the cause of the issue? If you can provide me a repo to reproduce the issue I'd gladly look into it |
I think so. I am testing this in a rails application, which has many pages. The script mostly likely attempts to add too many components which exceed the memory limit. That's why I am unable to share the repo at this time. If you are familiar with rails though, adding it via yarn & webpack, should cause the same issue on your end. |
Got it. Unfortunately without a reproduction repo it will probably take some time before I'm able to set this up, but I'll do what I can. If you ever manage to provide me with a reproduction repo (or at least your webpack config) that'd be ideal. Thanks! |
I will try to create a test app as soon as I get the chance. |
Same issue with a default Next.js installation |
@uurcank Removed webpack in Rails and switched to jsbuild. no longer getting this error. |
I get
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
error when compiling this with webpack.anyone else has the same problem?
The text was updated successfully, but these errors were encountered: