reactjs - Dynamically loading React components in WebStorm -


i can not resolve conf error when loading react component dynamically while using webstorm.

this component loading code using.

const req = require.context('.', true, /^(?!.\/index).*.js$/);  req.keys().foreach(key => {   const componentname = key.replace(/^.+\/([^/]+)\.js/, '$1');   module.exports[componentname] = req(key).default; }); 

it's loading code.

import { register } 'components'; 

is there way avoid unsolve errors in webstorm?

error picture:

error:


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -