Answer the question
In order to leave comments, you need to log in
webpack. How to make stylesheets compiled BEFORE html files?
Yes:
I use the postcss-modules plugin, which adds a hash to the names of css classes in the style file and exports them to a separate json table. Next, pug takes this table - and according to it, substitutes the necessary classes into the html page.
Issue: pug compiles before style files, causing " Can't resolve json
" errors.
Question: is it possible to arrange the compilation queue in the build? So that style files are processed first, and then html ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question