Skip to content

Commit 02c3536

Browse files
committed
Migrate angular application build system
1 parent db8eced commit 02c3536

File tree

6 files changed

+21
-15
lines changed

6 files changed

+21
-15
lines changed

angular/.browserslistrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
last 2 versions
1010
Firefox ESR
1111
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.
12+
not IE 9-11
13+
not kaios 2.5
14+
not op_mini all

angular/angular.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
"projectType": "application",
1010
"architect": {
1111
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
12+
"builder": "@angular-devkit/build-angular:application",
1313
"options": {
14-
"outputPath": "dist",
14+
"outputPath": {
15+
"base": "dist"
16+
},
1517
"index": "src/index.html",
16-
"main": "src/main.ts",
1718
"tsConfig": "src/tsconfig.json",
18-
"polyfills": "src/polyfills.ts",
19+
"polyfills": [
20+
"src/polyfills.ts"
21+
],
1922
"assets": [
2023
"src/assets",
2124
"src/favicon.ico",
@@ -49,12 +52,11 @@
4952
"src/assets/abp-web-resources/abp.freeze-ui.js",
5053
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js"
5154
],
52-
"vendorChunk": true,
5355
"extractLicenses": false,
54-
"buildOptimizer": false,
5556
"sourceMap": true,
5657
"optimization": false,
57-
"namedChunks": true
58+
"namedChunks": true,
59+
"browser": "src/main.ts"
5860
},
5961
"configurations": {
6062
"production": {
@@ -69,8 +71,6 @@
6971
"sourceMap": false,
7072
"namedChunks": false,
7173
"extractLicenses": true,
72-
"vendorChunk": false,
73-
"buildOptimizer": true,
7474
"fileReplacements": [
7575
{
7676
"replace": "src/environments/environment.ts",

angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"scripts": {
77
"pree2e": "webdriver-manager update --standalone false --gecko false",
88
"e2e": "protractor",
9-
"hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr",
9+
"hmr": "ng serve --host 0.0.0.0 --port 4200",
1010
"lint": "tslint --force --project src/tsconfig.json src/**/*.ts -t verbose",
1111
"ng": "ng",
12-
"start": "ng serve --host 0.0.0.0 --port 4200",
12+
"start": "ng serve --host 0.0.0.0 --port 4200 --no-hmr",
1313
"test": "ng test"
1414
},
1515
"dependencies": {

angular/src/app-initializer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class AppInitializer {
3838
const angularLocale = this.convertAbpLocaleToAngularLocale(
3939
abp.localization.currentLanguage.name
4040
);
41-
import(`/node_modules/@angular/common/locales/${angularLocale}.mjs`).then(
41+
import(`../node_modules/@angular/common/locales/${angularLocale}.mjs`).then(
4242
(module) => {
4343
registerLocaleData(module.default);
4444
resolve(result);

angular/src/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"esModuleInterop": true,
34
"allowSyntheticDefaultImports": true,
45
"declaration": false,
56
"downlevelIteration": true,
@@ -11,7 +12,8 @@
1112
"moduleResolution": "node",
1213
"outDir": "../dist/out-tsc",
1314
"sourceMap": true,
14-
"target": "es2015",
15+
"target": "ES2022",
16+
"useDefineForClassFields": false,
1517
"typeRoots": [
1618
"../node_modules/@types"
1719
],
@@ -21,7 +23,6 @@
2123
"@app/*": [ "./app/*" ],
2224
"@shared/*": [ "./shared/*" ],
2325
"@node_modules/*": [ "../node_modules/*" ],
24-
"@angular/*": ["../node_modules/@angular/*"],
2526
}
2627
},
2728
"files": [

angular/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
To learn more about this file see: https://angular.io/config/solution-tsconfig.
55
*/
66
{
7+
"compilerOptions": {
8+
"esModuleInterop": true
9+
},
710
"files": [],
811
"references": [
912
{

0 commit comments

Comments
 (0)