Prepends css code before each css files using webpack loaders

32 views Asked by At

I utilize PostCSS in my project, and for each CSS file, I find myself needing to import a file containing custom defaults such as variables, resets, etc. I'm wondering if there's a way to achieve this by configuring Webpack, possibly through the postcss-loader or other loaders.

I'm aware that sass-loader has the additionalData option, which allows you to include additional code in your SASS/SCSS files, but I couldn't find a similar feature for PostCSS.

0

There are 0 answers