Issue
Message:
Default and named imports from CSS files are deprecated. Use the ?inline query instead
This has just occurred recently in my React project, and I'm wondering how I can use an inline query. I've looked online and can't find anything.
Solution
Try using CSS modules and failing that you could delete the node modules and re-install them.
Also, how I fixed this issue was creating a new CSS file and re-installing the necessary dependencies. If that still does not work then you could always try with a fresh project folder if you're in a prototyping phase.
Also on the GitHub discussion for this issues it was recommended to use this syntax when with your CSS imports
import stuff from './global.css?inline'
Answered By - laegecan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.