Open sedx opened 1 month ago
We are used Native Federation with Vite and esbuild adapter.
Adapter is not call compensateExports for named imports.
compensateExports
Instead used named imports:
import { lazy } from 'react'; const Lazy = lazy(() => /** */);
We should use default:
import React from 'react'; const Lazy = React.lazy(() => /** */);
It's not comfortable because:
"jsx": "react-jsx"
I uncomment call of compensateExports https://github.com/angular-architects/module-federation-plugin/pull/501 and now it works fine.
FIY: @jogelin - you add todo with question about should we delete unused compensateExports, looks like it's usable feature. @manfredsteyer - you comment call of compensateExports, maybe you have some reason for do it
We are used Native Federation with Vite and esbuild adapter.
Adapter is not call
compensateExports
for named imports.Instead used named imports:
We should use default:
It's not comfortable because:
"jsx": "react-jsx"
in tsconfig.json we no need direct import ReactI uncomment call of compensateExports https://github.com/angular-architects/module-federation-plugin/pull/501 and now it works fine.
FIY: @jogelin - you add todo with question about should we delete unused
compensateExports
, looks like it's usable feature. @manfredsteyer - you comment call ofcompensateExports
, maybe you have some reason for do it