(Next.js) Global CSS cannot be imported from within node_modules.See original GitHub issue
I really enjoy the package, but it is not possible to be used with Next.js.
When importing the package I receive following error message.
error - ./node_modules/rc-slider/assets/index.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Using package version 4.16.5 with Next.js 9.5.1.
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Hi @lijinke666 trying to use your package, however having the same issue with Next.js.
Is it possible for you to make some changes and load the 2 CSS files directly from your local less files instead of the
index.js file of your package?
This will assure a compatibility with Next.js and also not using an outdated fork.