-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't used named exports when exporting in ES Module format. #531
Conversation
Tests are failing. Could you have a look? |
I noticed the failing e2e tests when I first made the PR. Those tests run inconsistently on my machine for main so I assumed this was an unrelated issue. Have you seen this before? I only ask because this change really only effect projects with |
Why is the build failing? I would expect the following additional changes to be made to the shared webpack config:
|
I'm not sure.
Yes, this is needed to support ESM. Since this would be my first contribution in this repo, my goal wasn't to do everything at once, but rather do it as a few minimal, easily tested and reviewable non-breaking changes. Because
I'm not sure on this one. I didn't run into this error.
Yeah that definitely needs to go away in the long term. I have played around with updating
Yes.
I think the best place for this is the existing If you want to make these changes yourself, feel free to close this, or if you know which of the above items you would like me to include in this PR, just lmk. |
@joeldenning @arturovt I looked into the failing tests more. The stack traces link to |
I hope to work on an official angular-microfrontends example soon and will likely make the necessary modifications to single-spa-angular as part of it. Using libraryTarget in the custom webpack config as a single-spa-angular configuration option doesn't sound like the most maintainable long-term approach. The webpack changes I suggested in my prior comment are after implementing native modules for both react and vue. Rather than debate them, I am closing this issue and will work on native modules feature on my own. I am stalked by people who try to prove me wrong, so it's easier just to do the work myself rather than let a contributor debate the workings of webpack that I've verified. The devServer.hot option can't be enabled when using libraryTarget module because the feature hasn't yet been implemented, but I am not familiar enough with the angular webpack config to know if hmr is ever enabled or if angular has a non-standard hmr implementation. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, setting
"libraryTarget": "module"
emits the following error:What is the new behavior?
The error is no longer emitted.
Does this PR introduce a breaking change?