Answer the question
In order to leave comments, you need to log in
Is there a webpack plugin for such imports?
Recently, with one eye, I saw a plugin or loader (adding an additional path) that allows you to import files (modules) of this kind
./components/Component/Component.js
by calling
import Component from './components/Component';
That is, it goes to the usual paths for finding the module
'./components/Component.js';
'./components/Component/index.js';
adds another path where the file name matches the folder name
'./components/Component/Component.js'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question