Remove CSS import in order to support Next.js
See original GitHub issueHi, I’m trying to use this component in a Next.js application, but the code fails to compile due to this error:
./node_modules/react-datasheet-grid/dist/style.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-datasheet-grid/dist/components/DataSheetGrid.js
See https://nextjs.org/docs/messages/css-npm
Would it be possible to remove the CSS import and allow developers to instead import the CSS in their own projects (to control how the CSS is consumed/injected)?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Basic Features: Built-in CSS Support - Next.js
Next.js allows you to import CSS files from a JavaScript file. This is possible because Next.js extends the concept of import beyond JavaScript....
Read more >Verify CSS import ordering · Issue #16630 · vercel/next.js
A user on twitter reported that Next.js may not order CSS imports from JS correctly. We need to investigate and fix this!
Read more >Next.js Global CSS cannot be imported from files other than ...
I've tried to remove new files I've added along with their code, but this doesn't fix the problem. I've also tried what the...
Read more >next-remove-imports - npm
This is a plugin for nextjs. The default behavior is to remove all .less / .css / .scss / .sass / .styl imports...
Read more >Global vs. Local Styling In Next.js - Smashing Magazine
Then, we can import style from ./TeaListItem.module.css in our TeaListitem component. The style variable comes in like a JavaScript object, so ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Alright, 4.0.0 is live 😉
Hello @iacobfred @cholazzzb lveillard, This will be live in less than 24h, this will be a v4 as it is not backward compatible.