javascript - Webpack issues about less dependencies
为情所困
为情所困 2017-05-16 13:44:21
0
1
781

I have a common.less and a constant.less which are two common lesss.

Now, for example, if I write a pop-up box component in react, I need to introduce a demo.less.
demo.less depends on common.less and constant.less.

I will write another list component and need a list.less.
Also depends on common.less and constant.less

So I @import demo.less;@import list.less;

in list.less and demo.less respectively

In this way, when webpack uses less-loader, common.less and constant.less will be parsed on both sides and inserted into the head tag using style tags. It looks very painful. Please ask the experts if there is a better solution. ?

为情所困
为情所困

reply all(1)
淡淡烟草味

When webpack is packaging, it will package all dependencies.. Wouldn’t it be better to only reference it in one place

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!