0

I try to figure out how to import/require global css which includes styles for tags like body and so. I use css-loader + style-loader with extract text plugin.. I noticed the :global selector but didn't know where exactly I should put the global.css and import it.

thanks

1 Answer 1

1

You should have an assets directory with a directory for stylesheets, where you can put the global.css file. Then, in your index.js file (where you render the dom) you can

require('./assets/stylesheets/global.css');

If your loaders are set up right, and this will bring in your css file and use it to format your application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.