-
Notifications
You must be signed in to change notification settings - Fork 543
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
Does not work with NextJS due to Next not supporting global CSS files #383
Comments
This practice introduced by NextJS seems like a regression from existing JS standard functionality. |
What version of NextJS are you using? This should be supported in recent versions, It works for me importing on Note that this NextJS feature is broken when using |
Thanks for the help, it turns out that `next-transpile-modules` is actually
the library that's responsible:
martpie/next-transpile-modules#146
We do unfortunately have a hard requirement on using that library though
(and the maintainer is actively looking for a solution as of 10 days ago),
so I suppose I'll just have to try and find a hack.
Although, it does appear that NextJS does break along these lines if you're
on a version prior to 9.5.4 We were able to upgrade past that, so it wasn't
a problem for us, but I know not everyone will be able to.
…On Wed, Feb 10, 2021 at 7:05 PM Gabriel Almeida ***@***.***> wrote:
What version of NextJS are you using? This should be supported in recent
versions, It works for me importing on _app or inside any component
directly
<https://nextjs.org/docs/basic-features/built-in-css-support#import-styles-from-node_modules>.
Check if you're above v9.5.4.
Note that this NextJS feature is broken when using npm link
<vercel/next.js#19717 (comment)>,
maybe that's your case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#383 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCTISVFYZW6EWXLQDTH6XDS6MNL3ANCNFSM4XNYRPSQ>
.
|
The current installation for this library recommends direct import of the styles library as a global CSS file.
However, some frameworks like NextJS forbid this methodology, throwing the following error:
(More about this practice in NextJS can be found in this thread).
Is it possible to update the library so that style is automatically injected into the component? I understand why the styles are exported separately (to support themes), but in our case we cannot use the recommended solution of manually exporting the library styles from
_app.js
.In my project's particular case, we are resorting to manually copying the styles from this lib and injecting them in our project location, but this is not ideal, so alternate solutions would be helpful. Thank you!
The text was updated successfully, but these errors were encountered: