I use less-loader with webpack, the annoying part is I have to import the variable.less in every single of my module's less file. Why it can't be just global?
相关问题
- Ignore Typescript errors in Webpack-dev-server
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
It's not clear from your question (can't tell if the problem you're having is something about your webpack setup), but if you're saying you have to do
variables.less
module1.less
module2.less
you can approach it like this:
all.less (other common names for this are
main.less
andapp.less
)variables.less
module1.less
module2.less