-
Notifications
You must be signed in to change notification settings - Fork 203
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
Native federation: support Angular i18n (partially) #413
Comments
Hi! I've realized that the solution that is in the PR will not work, but I have since dug into the angular application builder too. What I found, was that most of the esbuild options match, and that your builder and that one has some differences in build steps.
With all that in mind, I'm considering two different ways to go forward.
@manfredsteyer Please give your feedback on the approaches, any issues I didn't notice, or things I'm making an issue about that aren't actually problems. Oh yeah, and once I have the build, serving would be nice, but I haven't yet thought that through. |
@manfredsteyer to help process everything I wrote in my previous comment: see this latest (draft) PR #456 . (It's still a work in progress, but the changes to the adapter are mostly done.) It showcases what option 1 would look like. |
@manfredsteyer With my current progress I was able to make it work on my example project. I ask you to please review my code and give me feedback. |
Hi,
Other than these hiccups, it seems to work like a charm. I set up language specific configurations that I can run in parallel, in order to run multiple dev servers. I still have an open question: I'm not sure mappings should also go through the angular builder, maybe those should have also been sent through esbuild. @manfredsteyer Your review and feedback would be very welcome! |
@refactorTractor We are currently looking into the same issue. Thanks for all the legwork! @manfredsteyer It would be nice to get a response from you, also regarding #404, if this will ever be supported (or why not). |
Hi everyone, P.s. @refactorTractor you should probably remove the siemens URL from your PR#456 ;) |
Would also love to see support for such a crucial feature |
+1 |
@RaphaelJenni @ChrTopf @WizzardMaker @nbonneau I've released my changes in a package for 17.3.2: @fork-fork/native-federation My project at siemens uses it with success so far. Please try it out. Any feedback is welcome. One hint though: I only changed the native-federation package, nothing else. This comes with one drawback here: I couldn't add this package to the default skip list, so you'll have to add this package to it manually in your federation.config |
Hi!
Supporting angular i18n is a pretty important feature for me.
I think native federation can handle a partial scenario pretty easily. I assume that most shared modules are locale-agnostic - only the angular app itself requires inlining translations. So a logical first step could be to support a localized main-bundle with locale-independent shares.
It seems like this concept fits the architecture of native federation, because the main bundle's build is up to
angular-devkit/esbuild-browser
, and shared modules are bundled using esbuild natively.(I imagine that later down the line shared packages would have to be checked whether they're produced by ng-packagr, and then you could integrate their localizations.)
Anyway, for this first step I created #411 , please consider it.
The text was updated successfully, but these errors were encountered: