Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Tracking]: Angular support, second round #3158

Closed
15 of 23 tasks
zackarychapple opened this issue May 16, 2023 · 14 comments
Closed
15 of 23 tasks

[Tracking]: Angular support, second round #3158

zackarychapple opened this issue May 16, 2023 · 14 comments
Labels
tracking issue Category: A tracking issue for an RFC or an unstable feature.

Comments

@zackarychapple
Copy link
Contributor

zackarychapple commented May 16, 2023

What subject does this issue tracking?

Angular CLI rspack builder support

Now that we have the initial Angular support we found a few additional things that need to be added. This issue is for tracking them. Priority as shared by @valorkin.

Part two for #2099

Critical, this means the build step is working in the same fashion as the angular-cli and without these the build output is not fully functional

Tasks

Preview Give feedback

High Priority, this means the build step is working, however the output is slightly different from the output of the angular-cli

Tasks

Preview Give feedback

Low Priority, these are related mostly to the progress plugin and do not directly impact the output of the build

Tasks

Preview Give feedback

Performance Optimizations, these are things that we can do to begin to increase performance even more

@junshengL
Copy link

@zackarychapple I performed packaging, but the code reported an error and did not package the file

@zackarychapple
Copy link
Contributor Author

@junshengL do you have a repo example with your issue? Would be great to create one and open a separate issue, this is a tracking issue for general support.

This was referenced Jun 1, 2023
@qyjs
Copy link

qyjs commented Jun 21, 2023

I install the latest version and start

rspack version 0.2.3

image

@zackarychapple
Copy link
Contributor Author

@qyjs if you're wanting to use the Rspack build you should be just using the pnpm run build command.

@Narretz
Copy link

Narretz commented Oct 8, 2023

For the minicss extract plugin error, that happens in a block that works around a webpack error (that may or may not still exist):

https://github.com/webpack-contrib/mini-css-extract-plugin/blob/d5e540baf8280442e523530ebbbe31c57a4c4336/src/index.js#L608-L623

However, if you simply uncomment this block, the minicss extract plugin will crash a block later that doesn't seem to have anything to do with the previous block.

compiler.options.optimization.splitChunks.defaultSizeTypes is not defined

@zackarychapple
Copy link
Contributor Author

great context @Narretz. Hopefully this gets knocked out soon.

@hardfist
Copy link
Contributor

@Narretz we're gonna port mini-css-extract-plugin to rust side this quarter, hope this will solve your problem

@JounQin
Copy link

JounQin commented Jan 14, 2024

Can I use webpack@npm:rspack@latest for migrating smoothly? That will be a kiiler feature for Angular or any other projects.

@edumserrano
Copy link

edumserrano commented Apr 4, 2024

When all the tasks in this issue are completed does that mean that we will get out-of-the-box support for Angular, allowing us to quickly create an Angular project using rsbuild with npm create rsbuild@latest ?

I'd like to use rspack with my Angular projects but I don't know enough to try and manually configure it from scratch so I'm waiting for the out-of-the-box support and I'm wondering if this is the right issue to track...

@zackarychapple
Copy link
Contributor Author

When all the tasks in this issue are completed does that mean that we will get out-of-the-box support for Angular, allowing us to quickly create an Angular project using rsbuild with npm create rsbuild@latest ?

I'd like to use rspack with my Angular projects but I don't know enough to try and manually configure it from scratch so I'm waiting for the out-of-the-box support and I'm wondering if this is the right issue to track...

This issue was actually to support the pre-esbuild versions since many folks are still on pre-esbuild Angular. There is a separate task to support Rsbuild that is being worked on.

@edumserrano
Copy link

@zackarychapple I'm sorry, I'm a bit confused. If this is not the right issue I can track to understand when something like npm create rsbuild@latest will support an Angular template, then should I be able to find some issue about this on the https://github.com/web-infra-dev/rsbuild repo? I tried to look for it but can't find the:

There is a separate task to support Rsbuild that is being worked on.

@zackarychapple
Copy link
Contributor Author

I just tagged @hardfist in our internal chats to see if they want a separate issue for the Rsbuild Angular support. Will post it here if it gets added. I agree that they should be separate since this is the webpack/Rspack angular builder compatibility.

@edbzn
Copy link
Contributor

edbzn commented May 2, 2024

Hi there, I've created an example that builds and serves Angular using Rspack. However, given the complexity behind the Angular CLI and all the tasks it performs behind the scenes, I believe we will never achieve 100% compatibility with the base builder @angular-devkit/build-angular:browser. The Angular team treats the build specificities as an implementation detail they prefer not to expose. Consequently, it's challenging for us to integrate third-party tools requiring the same build configuration. We have to reimplement everything, which is extremely difficult and brittle. Therefore, in my opinion, we can only strive for something that closely approximates the original functionality.

As my example demonstrates that Rspack already supports all the critical functionalities for building and serving Angular, I intend to develop a third-party builder. This builder will aim to be retro-compatible with Webpack but with a different internal implementation and output that is slightly different. Not all Angular CLI features will be supported.

@zackarychapple
Copy link
Contributor Author

@valorkin maybe you want to chime in here too. I know you did quite a bit of work already on a custom builder.

@web-infra-dev web-infra-dev locked and limited conversation to collaborators Aug 13, 2024
@hardfist hardfist converted this issue into discussion #7549 Aug 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
tracking issue Category: A tracking issue for an RFC or an unstable feature.
Projects
None yet
Development

No branches or pull requests

8 participants