这是indexloc提供的服务,不要输入任何密码
Skip to content

feat : Update Angular templates to Angular 20 new build system #23363

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

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

fahrigedik
Copy link
Contributor

Description

Resolves #23242

This PR migrates ABP Angular templates and packages to Angular's new esbuild-based build system introduced in Angular 17+ and fully supported in Angular 20.

Changes Made

Template Migrations (3 templates):

  • templates/app/angular: Migrated from @angular-devkit/build-angular:browser to @angular-devkit/build-angular:application
  • templates/app-nolayers/angular: Migrated from @angular-devkit/build-angular:browser to @angular-devkit/build-angular:application
  • templates/module/angular: Migrated dev-app from @angular-devkit/build-angular:browser to @angular-devkit/build-angular:application

Package Updates (14 packages):

Updated TypeScript configuration for all ABP Angular packages:

  • core, components, feature-management, oauth, account-core, account, permission-management, theme-basic, theme-shared, tenant-management, setting-management, identity, source-code-requirements, schematics

Key Configuration Changes:

  • Builder: browserapplication
  • Main: mainbrowser (new property name)
  • Polyfills: String → Array format
  • TypeScript: es2018es2020, added esModuleInterop: true
  • Module: es2020esnext

Template File Updates:

  • Updated schematics template files to use es2020 instead of es2018

Benefits

  • Performance: Faster build times with esbuild
  • Modern: ESM (ES Modules) support with dynamic imports
  • Future-ready: Prepared for Angular 21+ updates
  • SSR Ready: Built-in SSR and prerendering capabilities
  • Hot Reload: Improved development experience

Breaking Changes

None - This is a non-breaking change that improves build performance and modernizes the build system.

Documentation

Reference: Angular Build System Migration Guide

Checklist

  • I fully tested it as developer / designer and created unit / integration tests
  • I documented it (or no need to document or I will create a separate documentation issue)

Switched build executor from 'browser' to 'application' and updated build options to use 'browser' and array format for 'polyfills'. Also removed unused options from the development configuration for cleaner setup.
Changed the 'lib' setting from 'es2018' to 'es2020' in all package tsconfig.lib.json files and updated tsconfig.base.json to use 'es2020'. Also added 'esModuleInterop' to tsconfig.base.json for improved module compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular - Migrate to New Esbuild-based Angular Builder
1 participant