Answer the question
In order to leave comments, you need to log in
How to make Webpack eat Less + BEM normally?
My project looks like
--blocks -> тут блоки со своими less и тд технологиями
--less
--mixins -> тут миксины со своими less
variables.less -> переменные
let files = [];
function importAll(r) {
r.keys().forEach((s, i) => {
files[i] = r(s);
});
}
import '../less/variables.less';
importAll(require.context('../less/mixins/', true, /\.less$/));
importAll(require.context('../blocks/', true, /(\.less|\.js)$/));
importAll(require.context('../assets/', true, /\.less|\.js|\.css$/));
Answer the question
In order to leave comments, you need to log in
The only solution is to include mixins and variables in one file and not worry about including the common file when necessary in blocks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question