Answer the question
In order to leave comments, you need to log in
Is there a way to index source folders in webpack?
I created the project structure, the assembly goes through Webpack, one minus is that you have to write similar paths for local files, for example
include pug/main-blocks/footer.pug
import '../../styles/main.scss';
import '../../js/custom/custom.js';
require('inputmask');
Answer the question
In order to leave comments, you need to log in
You can set resolve from the root of the project in the webpack config, then you can specify the absolute path.
If you want completely by analogy, then in fact you need to drive all the directories that are in the project into resolve.
The solution is so-so and will work slowly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question