Sign in
Log inSign up

What package allows Mern to do `import styles from './Foo.css';`?

Alan's photo
Alan
·Aug 11, 2016

Title says it all, specifically being able to import CSS styles and reference as keys. I'm curious what allows the syntax import styles from './Foo.css';. Looking in package.json I saw some hints and did some web searches but still can't identify exactly which package provides this behavior.

To add a bit more context, I have an existing non-mern project and would love to have similar functionality. One answer references "babel" but I'm fairly certain that's not enough to be able to import css styles and reference them by key.

What are the exact packages I would have to add to package.json to be able to have this functionality?