WARNING in ./node_modules/react-resource-router/build/esm/controllers/index.js 7:0-55
"export 'WithRouter' was not found in './with-router'
@ ./node_modules/react-resource-router/build/esm/index.js
A Error for esbuld
✘ [ERROR] No matching export in "../../../node_modules/react-resource-router/build/esm/controllers/with-router/index.js" for import "WithRouter"
The fix
activating isolatedModules to force TypeScript to remove typed from produced js, keeping only in d.ts. That removes the problem.
During the build TS will complain if type export (not import) has not been properly attributed.
Question
There are other types exported in plain esm right now. Only WithRouter creates a problem
Solves
Warning
for webpack:Error
for esbuldThe fix
Question
There are other types exported in plain esm right now. Only
WithRouter
creates a problemFollowup
typescript-eslint
update) can automatically maintain proper usage ofimport/export type
in the code base.