A misleading title with no useful information at all (IMHO).
Surely it's gonna work for smth like create-react-app (because , but it does not answer the question of how to actually import .css (and basically any file other than JS modules) in react (and basically in any JavaScript file)
For anyone who accidentally spots this article and is interested in it just google webpack, webpack loaders or any other loaders in any other bundlers (parcel, esbuild, rollup)
FYI, inside a JS file you cannot import anything other that another JS-module so you need something that searches for code that imports .css, then transforms that .css module into a JS module and replaces the .css import with an ordinary JS import
(correct me if I'm wrong, interesting to know other ways to do it)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A misleading title with no useful information at all (IMHO).
Surely it's gonna work for smth like create-react-app (because , but it does not answer the question of how to actually import .css (and basically any file other than JS modules) in react (and basically in any JavaScript file)
For anyone who accidentally spots this article and is interested in it just google webpack, webpack loaders or any other loaders in any other bundlers (parcel, esbuild, rollup)
FYI, inside a JS file you cannot import anything other that another JS-module so you need something that searches for code that imports .css, then transforms that .css module into a JS module and replaces the .css import with an ordinary JS import
(correct me if I'm wrong, interesting to know other ways to do it)