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

Use within Nextjs #6

Open
heijmerikx opened this issue Apr 12, 2022 · 2 comments
Open

Use within Nextjs #6

heijmerikx opened this issue Apr 12, 2022 · 2 comments

Comments

@heijmerikx
Copy link

Hi there, when using this module in Nextjs the issue: vercel/next.js#19936 is present. The error I get is:

./node_modules/@klaxit/cookie-consent/src/styles/main.scss
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/@klaxit/cookie-consent/src/index.js

Is it possible to use compiled css too? I've tried using my non-existent webpack skills, to no avail. Or am I looking in the wrong direction completely?

@ccyrille
Copy link
Contributor

ccyrille commented Apr 15, 2022

Hi @heijmerikx,

I have to admit that I am totally unfamiliar to Nextjs (we don't use it at Klaxit). For what I could read from the issue you pointed out and the related RFC, it seems that next-global-css has been built just to solve this issue.

Did you give it a try ?

@heijmerikx
Copy link
Author

Thank you @ccyrille for your reply and suggestion. I tried it, but it posed other problems, so I'll try to figure out how to approach my problem another way. Again, thank you for your response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants