Answer the question
In order to leave comments, you need to log in
Why doesn't webpack track style changes?
No matter how I used boilerplate with Webpack, there is one problem everywhere: changes in styles (in my case Stylus) connected via @import
. That is, there is a main style file app.styl
, and all other styles are imported into it, changes to them are not displayed in the browser in any way - you either have to restart the server ( npm run dev
) or make a change in app.styl
. Itself app.styl
is connected in main.js
this way: import './styles/app.styl';
.
Tell me what could be the problem?
Answer the question
In order to leave comments, you need to log in
I figured it out - the problem was that in app.styl I imported styles in this way:
Webpack does not understand Stylus variables and simply ignores such imports. If you write without a variable, then everything will work:
@import '../../components/Navbar/navbar.components'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question