Next.js: Importing a CSS file from node_modules is permitted in anywhere your application.

Created on 1 Oct 2020  路  2Comments  路  Source: vercel/next.js

This is on the docs Importing a CSS file from node_modules is permitted in anywhere your application., but I get an error when importing CSS from node_mudules like this import 'react-quill/dist/quill.snow.css' and if I use the @zeit/next-css then that works but the Built-In CSS Support by nex.js breaks. So we need both module/css and default node modules imports by default. I am new to react and nex.js and I can't believe that this is still an issue. Learning how to use CSS with react is more frustrating than learning react :(

Most helpful comment

@mylastore Just checked and you're right. Our docs are currently showing some features that are only available in next@canary, including global CSS imports from node_modules (I'm very sorry for the confusion here 馃檹).

You can either wait for a new release that's coming out very soon or update to next@canary for the moment.

I'm going to close the issue for now, and thank you for letting us know! I'll try to do better next time.

All 2 comments

@mylastore Just checked and you're right. Our docs are currently showing some features that are only available in next@canary, including global CSS imports from node_modules (I'm very sorry for the confusion here 馃檹).

You can either wait for a new release that's coming out very soon or update to next@canary for the moment.

I'm going to close the issue for now, and thank you for letting us know! I'll try to do better next time.

Glad I found this as I'm having the same issue. Thanks @mylastore for posting and @lfades for answering!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

formula349 picture formula349  路  3Comments

olifante picture olifante  路  3Comments

pie6k picture pie6k  路  3Comments

jesselee34 picture jesselee34  路  3Comments

irrigator picture irrigator  路  3Comments