F
F
frontendo2018-08-23 17:56:07
React
frontendo, 2018-08-23 17:56:07

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

1 answer(s)
F
frontendo, 2018-08-23
@frontendo

found
https://github.com/toptal/component-resolver-webpack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question