Skip to content

Support for custom webpack configurations #27028

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

Closed
DavidGoethCplace opened this issue Feb 2, 2024 · 5 comments
Closed

Support for custom webpack configurations #27028

DavidGoethCplace opened this issue Feb 2, 2024 · 5 comments

Comments

@DavidGoethCplace
Copy link

DavidGoethCplace commented Feb 2, 2024

Command

I don't know which commands are affected

Description

My company uses webpack module federation (by WebpackModuleFederation plugin) for a step-by-step migration from angular-js to latest angular version.
The problem we face is that a development build is not working due to the 'ngDevMode is not defined' problem as it is already reported here: #25830

We can workaround this by defining the ngDevMode manually:

config.plugins.push(
new webpack.DefinePlugin({
      ngDevMode: config.mode === 'development'
}));

But that is an angular internal.
I would appreciate it if the AngularWebpackPlugin would handle that directly.

Describe the solution you'd like

A rudimentary custom webpack configuration support. So that at least simple custom webpack configurations are supported.

Describe alternatives you've considered

No response

@alan-agius4
Copy link
Collaborator

By design, custom webpack configurations are not supported. Employing such custom configurations directs you towards an undesirable path.

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
@DavidGoethCplace
Copy link
Author

DavidGoethCplace commented Feb 2, 2024

@alan-agius4 : If it is done by design what would be your suggestion? How would you solve the initial problem of module federation? As far as I know this is not possible without a custom webpack configuration.

You say my path is undesirable. What would be an alternative (desirable) path?

@alan-agius4
Copy link
Collaborator

The tracking of official microfrontend support can be found at #17556. However, it is important to note that there is currently no official support available.

Additionally, it's worth acknowledging that module federation is tied to the older build system utilizing Webpack, and it is not compatible with the new Esbuild pipeline, even with the use of custom plugins.

Nevertheless, there is an ongoing implementation by the community utilizing native import maps, which can be explored at https://www.npmjs.com/package/@angular-architects/native-federation.

@DavidGoethCplace
Copy link
Author

ok, thank you

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants