Anthony Frehner
Anthony Frehner
see this also: https://github.com/microsoft/TypeScript/issues/28985#issuecomment-754236793 my thoughts are maybe TS could support a remote def file, which you could update as part of your CI process.
This issue is for Typescript integration with MFEs in single-spa; please keep the discussion to that topic.
Also, here's a related issue in the module federation repo for the same type of thing: https://github.com/module-federation/module-federation-examples/issues/20
I tried some things out, but eventually came back to the basics to get TS working with cross-MFE import: using NPM to publish only the types, and installing them locally...
> I just get "Module not found: Error: Can't resolve" I've set up the module in the system.imports. But I'm using typescript which is trying to compile the imports before...
Perhaps the error is a red herring? But here's a video of a clean project not working in Firefox (top browser), and working in Chrome (middle) and Safari (bottom) https://user-images.githubusercontent.com/3054066/188650771-247bbe01-e123-4c09-b3e6-0c8f249a5a98.mov...
>Firefox developer edition is up to date >105.0b7 (64-bit) Yup!
Putting this in my console ```js new EventSource('/_frsh/alive').addEventListener('error', (err) => { console.log(err) }) ``` Seems to fire the event handler, and prints out an error. I'm not sure if there's...
>Definitely the easiest way to have subpath exports that “work” even in module resolvers that don’t support them is to do away with having a dist folder in your npm...
I was unable to reproduce the issue, and I get >{email: '[email protected]', status: 'subscribed'} in the console.