Skip to content

[Blazor] Modernize and Centralize our JS build infrastructure #52964

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
javiercn opened this issue Dec 22, 2023 · 1 comment
Closed

[Blazor] Modernize and Centralize our JS build infrastructure #52964

javiercn opened this issue Dec 22, 2023 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@javiercn
Copy link
Member

javiercn commented Dec 22, 2023

We have multiple assets that we build across multiple projects:

  • src/JSInterop/Microsoft.JSInterop.JS/src
  • src/Components/dotnet-runtime-js
  • src/Components/Web.JS/
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Interop
  • src/Components/WebAssembly/Authentication.Msal/src/Interop
  • src/Components/CustomElements/src/js

Each with their own unique setup for building and bundling JS. In addition to unifying our JS dependencies, we should unify our build setup/config to:

  1. Minimize the maintenance work when updating/upgrading.
  2. Ensure all projects benefit from the improvements to the infrastructure.
  3. Reduce the time to setup a new JS project.

As part of this effort, it'll be a good idea to consider replacing webpack with a more modern bundler/toolchain. The recommended candidate here is Vite, as it's becoming the the facto standard for most frameworks and it provides a higher-level abstraction over the underlying bundler (rollup or esbuild), which also means we are more isolated from the underlying bundler and will likely benefit from changes/improvements in new versions with less work.

In addition to standarizing on Vite, we should also switch to Vitest to replace Jest, as Vitest reuses the build configuration from Vite and avoids having to duplicate it across the board (both tools support typescript natively, which will reduce our maintenance cost).

@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Dec 22, 2023
@javiercn
Copy link
Member Author

#53150
#53117
#53095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

1 participant