@nx/angular 0.0.0-pr-3-c6ccd0d → 0.0.0-pr-29860-2cec332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators.json +5 -0
- package/migrations.json +118 -0
- package/package.json +9 -8
- package/src/builders/dev-server/schema.json +3 -3
- package/src/generators/convert-to-rspack/convert-to-rspack.d.ts +4 -0
- package/src/generators/convert-to-rspack/convert-to-rspack.js +83 -0
- package/src/generators/convert-to-rspack/lib/create-config.d.ts +18 -0
- package/src/generators/convert-to-rspack/lib/create-config.js +70 -0
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +6 -0
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +75 -0
- package/src/generators/convert-to-rspack/lib/update-tsconfig.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/update-tsconfig.js +14 -0
- package/src/generators/convert-to-rspack/schema.d.ts +5 -0
- package/src/generators/convert-to-rspack/schema.json +32 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/__rootModuleFileName__ +2 -2
- package/src/generators/setup-ssr/files/v19+/application-builder/server/__serverFileName__ +1 -1
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.config.server.ts__tpl__ +2 -2
- package/src/generators/setup-ssr/files/v19+/application-builder-common-engine/server/__serverFileName__ +2 -0
- package/src/generators/setup-ssr/lib/generate-files.js +12 -1
- package/src/generators/utils/ensure-angular-dependencies.js +0 -1
- package/src/migrations/update-20-5-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-20-5-0/update-angular-cli.js +23 -0
- package/src/utils/backward-compatible-versions.js +2 -0
- package/src/utils/versions.d.ts +6 -5
- package/src/utils/versions.js +7 -6
package/generators.json
CHANGED
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
"schema": "./src/generators/convert-to-application-executor/schema.json",
|
|
39
39
|
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder."
|
|
40
40
|
},
|
|
41
|
+
"convert-to-rspack": {
|
|
42
|
+
"factory": "./src/generators/convert-to-rspack/convert-to-rspack",
|
|
43
|
+
"schema": "./src/generators/convert-to-rspack/schema.json",
|
|
44
|
+
"description": "Converts Angular Webpack projects to use Rspack."
|
|
45
|
+
},
|
|
41
46
|
"directive": {
|
|
42
47
|
"factory": "./src/generators/directive/directive",
|
|
43
48
|
"schema": "./src/generators/directive/schema.json",
|
package/migrations.json
CHANGED
|
@@ -347,6 +347,15 @@
|
|
|
347
347
|
},
|
|
348
348
|
"description": "Update the @angular/cli package version to ~19.1.0.",
|
|
349
349
|
"factory": "./src/migrations/update-20-4-0/update-angular-cli"
|
|
350
|
+
},
|
|
351
|
+
"update-angular-cli-version-19-2-0": {
|
|
352
|
+
"cli": "nx",
|
|
353
|
+
"version": "20.5.0-beta.5",
|
|
354
|
+
"requires": {
|
|
355
|
+
"@angular/core": ">=19.2.0"
|
|
356
|
+
},
|
|
357
|
+
"description": "Update the @angular/cli package version to ~19.2.0.",
|
|
358
|
+
"factory": "./src/migrations/update-20-5-0/update-angular-cli"
|
|
350
359
|
}
|
|
351
360
|
},
|
|
352
361
|
"packageJsonUpdates": {
|
|
@@ -1049,6 +1058,22 @@
|
|
|
1049
1058
|
"@angular-eslint/utils": {
|
|
1050
1059
|
"version": "^18.0.1",
|
|
1051
1060
|
"alwaysAddToPackageJson": false
|
|
1061
|
+
},
|
|
1062
|
+
"@angular-eslint/schematics": {
|
|
1063
|
+
"version": "^18.0.1",
|
|
1064
|
+
"alwaysAddToPackageJson": false
|
|
1065
|
+
},
|
|
1066
|
+
"@angular-eslint/test-utils": {
|
|
1067
|
+
"version": "^18.0.1",
|
|
1068
|
+
"alwaysAddToPackageJson": false
|
|
1069
|
+
},
|
|
1070
|
+
"@angular-eslint/builder": {
|
|
1071
|
+
"version": "^18.0.1",
|
|
1072
|
+
"alwaysAddToPackageJson": false
|
|
1073
|
+
},
|
|
1074
|
+
"@angular-eslint/bundled-angular-compiler": {
|
|
1075
|
+
"version": "^18.0.1",
|
|
1076
|
+
"alwaysAddToPackageJson": false
|
|
1052
1077
|
}
|
|
1053
1078
|
}
|
|
1054
1079
|
},
|
|
@@ -1368,6 +1393,22 @@
|
|
|
1368
1393
|
"@angular-eslint/utils": {
|
|
1369
1394
|
"version": "^19.0.0",
|
|
1370
1395
|
"alwaysAddToPackageJson": false
|
|
1396
|
+
},
|
|
1397
|
+
"@angular-eslint/schematics": {
|
|
1398
|
+
"version": "^19.0.0",
|
|
1399
|
+
"alwaysAddToPackageJson": false
|
|
1400
|
+
},
|
|
1401
|
+
"@angular-eslint/test-utils": {
|
|
1402
|
+
"version": "^19.0.0",
|
|
1403
|
+
"alwaysAddToPackageJson": false
|
|
1404
|
+
},
|
|
1405
|
+
"@angular-eslint/builder": {
|
|
1406
|
+
"version": "^19.0.0",
|
|
1407
|
+
"alwaysAddToPackageJson": false
|
|
1408
|
+
},
|
|
1409
|
+
"@angular-eslint/bundled-angular-compiler": {
|
|
1410
|
+
"version": "^19.0.0",
|
|
1411
|
+
"alwaysAddToPackageJson": false
|
|
1371
1412
|
}
|
|
1372
1413
|
}
|
|
1373
1414
|
},
|
|
@@ -1410,6 +1451,22 @@
|
|
|
1410
1451
|
"@angular-eslint/utils": {
|
|
1411
1452
|
"version": "^19.0.2",
|
|
1412
1453
|
"alwaysAddToPackageJson": false
|
|
1454
|
+
},
|
|
1455
|
+
"@angular-eslint/schematics": {
|
|
1456
|
+
"version": "^19.0.2",
|
|
1457
|
+
"alwaysAddToPackageJson": false
|
|
1458
|
+
},
|
|
1459
|
+
"@angular-eslint/test-utils": {
|
|
1460
|
+
"version": "^19.0.2",
|
|
1461
|
+
"alwaysAddToPackageJson": false
|
|
1462
|
+
},
|
|
1463
|
+
"@angular-eslint/builder": {
|
|
1464
|
+
"version": "^19.0.2",
|
|
1465
|
+
"alwaysAddToPackageJson": false
|
|
1466
|
+
},
|
|
1467
|
+
"@angular-eslint/bundled-angular-compiler": {
|
|
1468
|
+
"version": "^19.0.2",
|
|
1469
|
+
"alwaysAddToPackageJson": false
|
|
1413
1470
|
}
|
|
1414
1471
|
}
|
|
1415
1472
|
},
|
|
@@ -1485,6 +1542,67 @@
|
|
|
1485
1542
|
"alwaysAddToPackageJson": false
|
|
1486
1543
|
}
|
|
1487
1544
|
}
|
|
1545
|
+
},
|
|
1546
|
+
"20.5.0": {
|
|
1547
|
+
"version": "20.5.0-beta.5",
|
|
1548
|
+
"x-prompt": "Do you want to update the Angular version to v19.2?",
|
|
1549
|
+
"requires": {
|
|
1550
|
+
"@angular/core": ">=19.2.0 <20.0.0-next.0"
|
|
1551
|
+
},
|
|
1552
|
+
"packages": {
|
|
1553
|
+
"@angular-devkit/build-angular": {
|
|
1554
|
+
"version": "~19.2.0",
|
|
1555
|
+
"alwaysAddToPackageJson": false
|
|
1556
|
+
},
|
|
1557
|
+
"@angular-devkit/core": {
|
|
1558
|
+
"version": "~19.2.0",
|
|
1559
|
+
"alwaysAddToPackageJson": false
|
|
1560
|
+
},
|
|
1561
|
+
"@angular-devkit/schematics": {
|
|
1562
|
+
"version": "~19.2.0",
|
|
1563
|
+
"alwaysAddToPackageJson": false
|
|
1564
|
+
},
|
|
1565
|
+
"@angular/build": {
|
|
1566
|
+
"version": "~19.2.0",
|
|
1567
|
+
"alwaysAddToPackageJson": false
|
|
1568
|
+
},
|
|
1569
|
+
"@angular/pwa": {
|
|
1570
|
+
"version": "~19.2.0",
|
|
1571
|
+
"alwaysAddToPackageJson": false
|
|
1572
|
+
},
|
|
1573
|
+
"@angular/ssr": {
|
|
1574
|
+
"version": "~19.2.0",
|
|
1575
|
+
"alwaysAddToPackageJson": false
|
|
1576
|
+
},
|
|
1577
|
+
"@schematics/angular": {
|
|
1578
|
+
"version": "~19.2.0",
|
|
1579
|
+
"alwaysAddToPackageJson": false
|
|
1580
|
+
},
|
|
1581
|
+
"@angular-devkit/architect": {
|
|
1582
|
+
"version": "~0.1902.0",
|
|
1583
|
+
"alwaysAddToPackageJson": false
|
|
1584
|
+
},
|
|
1585
|
+
"@angular-devkit/build-webpack": {
|
|
1586
|
+
"version": "~0.1902.0",
|
|
1587
|
+
"alwaysAddToPackageJson": false
|
|
1588
|
+
},
|
|
1589
|
+
"@angular/core": {
|
|
1590
|
+
"version": "~19.2.0",
|
|
1591
|
+
"alwaysAddToPackageJson": true
|
|
1592
|
+
},
|
|
1593
|
+
"@angular/material": {
|
|
1594
|
+
"version": "~19.2.1",
|
|
1595
|
+
"alwaysAddToPackageJson": false
|
|
1596
|
+
},
|
|
1597
|
+
"@angular/cdk": {
|
|
1598
|
+
"version": "~19.2.1",
|
|
1599
|
+
"alwaysAddToPackageJson": false
|
|
1600
|
+
},
|
|
1601
|
+
"ng-packagr": {
|
|
1602
|
+
"version": "~19.2.0",
|
|
1603
|
+
"alwaysAddToPackageJson": false
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1488
1606
|
}
|
|
1489
1607
|
}
|
|
1490
1608
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-29860-2cec332",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -71,13 +71,14 @@
|
|
|
71
71
|
"semver": "^7.5.3",
|
|
72
72
|
"tslib": "^2.3.0",
|
|
73
73
|
"webpack-merge": "^5.8.0",
|
|
74
|
-
"@nx/devkit": "0.0.0-pr-
|
|
75
|
-
"@nx/js": "0.0.0-pr-
|
|
76
|
-
"@nx/eslint": "0.0.0-pr-
|
|
77
|
-
"@nx/webpack": "0.0.0-pr-
|
|
78
|
-
"@nx/
|
|
79
|
-
"@nx/
|
|
80
|
-
"@nx/
|
|
74
|
+
"@nx/devkit": "0.0.0-pr-29860-2cec332",
|
|
75
|
+
"@nx/js": "0.0.0-pr-29860-2cec332",
|
|
76
|
+
"@nx/eslint": "0.0.0-pr-29860-2cec332",
|
|
77
|
+
"@nx/webpack": "0.0.0-pr-29860-2cec332",
|
|
78
|
+
"@nx/rspack": "0.0.0-pr-29860-2cec332",
|
|
79
|
+
"@nx/module-federation": "0.0.0-pr-29860-2cec332",
|
|
80
|
+
"@nx/web": "0.0.0-pr-29860-2cec332",
|
|
81
|
+
"@nx/workspace": "0.0.0-pr-29860-2cec332",
|
|
81
82
|
"piscina": "^4.4.0"
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
},
|
|
79
79
|
"publicHost": {
|
|
80
80
|
"type": "string",
|
|
81
|
-
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
|
|
81
|
+
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders."
|
|
82
82
|
},
|
|
83
83
|
"allowedHosts": {
|
|
84
84
|
"type": "array",
|
|
85
|
-
"description": "List of hosts that are allowed to access the dev server.",
|
|
85
|
+
"description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
|
|
86
86
|
"default": [],
|
|
87
87
|
"items": {
|
|
88
88
|
"type": "string"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
"disableHostCheck": {
|
|
96
96
|
"type": "boolean",
|
|
97
|
-
"description": "Don't verify connected clients are part of allowed hosts.",
|
|
97
|
+
"description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.",
|
|
98
98
|
"default": false
|
|
99
99
|
},
|
|
100
100
|
"hmr": {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertToRspack = convertToRspack;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const versions_1 = require("../../utils/versions");
|
|
6
|
+
const create_config_1 = require("./lib/create-config");
|
|
7
|
+
const get_custom_webpack_config_1 = require("./lib/get-custom-webpack-config");
|
|
8
|
+
const update_tsconfig_1 = require("./lib/update-tsconfig");
|
|
9
|
+
async function convertToRspack(tree, schema) {
|
|
10
|
+
const { project: projectName } = schema;
|
|
11
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
12
|
+
const tasks = [];
|
|
13
|
+
const createConfigOptions = {
|
|
14
|
+
root: project.root,
|
|
15
|
+
};
|
|
16
|
+
const buildTargetNames = [];
|
|
17
|
+
let customWebpackConfigPath;
|
|
18
|
+
for (const [targetName, target] of Object.entries(project.targets)) {
|
|
19
|
+
if (target.executor === '@angular-devkit/build-angular:browser' ||
|
|
20
|
+
target.executor === '@nx/angular:webpack-browser') {
|
|
21
|
+
createConfigOptions.browser = target.options.main;
|
|
22
|
+
createConfigOptions.index = target.options.index;
|
|
23
|
+
createConfigOptions.assets = target.options.assets.map((asset) => {
|
|
24
|
+
if (typeof asset === 'string') {
|
|
25
|
+
return asset;
|
|
26
|
+
}
|
|
27
|
+
return asset.input;
|
|
28
|
+
});
|
|
29
|
+
createConfigOptions.styles = target.options.styles;
|
|
30
|
+
createConfigOptions.scripts = target.options.scripts;
|
|
31
|
+
createConfigOptions.polyfills = target.options.polyfills;
|
|
32
|
+
createConfigOptions.tsconfigPath = target.options.tsConfig;
|
|
33
|
+
createConfigOptions.jit =
|
|
34
|
+
target.options.aot === undefined ? false : !target.options.aot;
|
|
35
|
+
createConfigOptions.inlineStylesExtension =
|
|
36
|
+
target.options.inlineStyleLanguage === undefined
|
|
37
|
+
? 'css'
|
|
38
|
+
: target.options.inlineStyleLanguage;
|
|
39
|
+
createConfigOptions.fileReplacements = target.options.fileReplacements;
|
|
40
|
+
createConfigOptions.stylePreprocessorOptions =
|
|
41
|
+
target.options.stylePreprocessorOptions;
|
|
42
|
+
if (target.options.customWebpackConfig) {
|
|
43
|
+
customWebpackConfigPath = target.options.customWebpackConfig.path;
|
|
44
|
+
}
|
|
45
|
+
// TODO: Add more options that can be correctly mapped
|
|
46
|
+
buildTargetNames.push(targetName);
|
|
47
|
+
}
|
|
48
|
+
else if (target.executor === '@angular-devkit/build-angular:dev-server' ||
|
|
49
|
+
target.executor === '@nx/angular:dev-server' ||
|
|
50
|
+
target.executor === '@nx/angular:module-federation-dev-server') {
|
|
51
|
+
const port = target.options.port ?? 4200;
|
|
52
|
+
project[targetName] = {
|
|
53
|
+
options: {
|
|
54
|
+
port,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const customWebpackConfigInfo = customWebpackConfigPath
|
|
60
|
+
? await (0, get_custom_webpack_config_1.getCustomWebpackConfig)(tree, project.root, customWebpackConfigPath)
|
|
61
|
+
: undefined;
|
|
62
|
+
(0, create_config_1.createConfig)(tree, createConfigOptions, customWebpackConfigInfo?.normalizedPathToCustomWebpackConfig, customWebpackConfigInfo?.isWebpackConfigFunction);
|
|
63
|
+
(0, update_tsconfig_1.updateTsconfig)(tree, project.root);
|
|
64
|
+
for (const targetName of buildTargetNames) {
|
|
65
|
+
delete project.targets[targetName];
|
|
66
|
+
}
|
|
67
|
+
(0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
|
|
68
|
+
const { rspackInitGenerator } = (0, devkit_1.ensurePackage)('@nx/rspack', versions_1.nxVersion);
|
|
69
|
+
await rspackInitGenerator(tree, {
|
|
70
|
+
addPlugin: true,
|
|
71
|
+
});
|
|
72
|
+
if (!schema.skipInstall) {
|
|
73
|
+
const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
74
|
+
'@ng-rspack/build': versions_1.ngRspackVersion,
|
|
75
|
+
});
|
|
76
|
+
tasks.push(installTask);
|
|
77
|
+
}
|
|
78
|
+
if (!schema.skipFormat) {
|
|
79
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
80
|
+
}
|
|
81
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
82
|
+
}
|
|
83
|
+
exports.default = convertToRspack;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
export interface CreateConfigOptions {
|
|
3
|
+
root: string;
|
|
4
|
+
index: string;
|
|
5
|
+
browser: string;
|
|
6
|
+
server?: string;
|
|
7
|
+
ssrEntry?: string;
|
|
8
|
+
polyfills: string[];
|
|
9
|
+
tsconfigPath: string;
|
|
10
|
+
assets: string[];
|
|
11
|
+
styles: string[];
|
|
12
|
+
scripts: string[];
|
|
13
|
+
jit?: boolean;
|
|
14
|
+
inlineStylesExtension?: string;
|
|
15
|
+
fileReplacements?: string[];
|
|
16
|
+
stylePreprocessorOptions?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export declare function createConfig(tree: Tree, opts: Partial<CreateConfigOptions>, existingWebpackConfigPath?: string, isExistingWebpackConfigFunction?: boolean): void;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createConfig = createConfig;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function createConfig(tree, opts, existingWebpackConfigPath, isExistingWebpackConfigFunction) {
|
|
6
|
+
const configContents = `import { resolve } from 'path';
|
|
7
|
+
import { createConfig }from '@ng-rspack/build';
|
|
8
|
+
${existingWebpackConfigPath
|
|
9
|
+
? `import baseWebpackConfig from '${existingWebpackConfigPath}';
|
|
10
|
+
${isExistingWebpackConfigFunction
|
|
11
|
+
? ''
|
|
12
|
+
: `import webpackMerge from 'webpack-merge';`}`
|
|
13
|
+
: ''}
|
|
14
|
+
|
|
15
|
+
${existingWebpackConfigPath ? 'const baseConfig = ' : 'export default '}createConfig({
|
|
16
|
+
root: __dirname,
|
|
17
|
+
index: '${normalizeFromProjectRoot(opts.index, opts.root)}',
|
|
18
|
+
browser: '${normalizeFromProjectRoot(opts.browser, opts.root)}',
|
|
19
|
+
${opts.server
|
|
20
|
+
? `server: '${normalizeFromProjectRoot(opts.server, opts.root)}',`
|
|
21
|
+
: ''}
|
|
22
|
+
${opts.ssrEntry
|
|
23
|
+
? `ssrEntry: '${normalizeFromProjectRoot(opts.ssrEntry, opts.root)}',`
|
|
24
|
+
: ''}
|
|
25
|
+
tsconfigPath: resolve(__dirname, '${normalizeFromProjectRoot(opts.tsconfigPath, opts.root)}'),
|
|
26
|
+
polyfills: ${JSON.stringify(opts.polyfills)},
|
|
27
|
+
assets: ${JSON.stringify(opts.assets.map((a) => normalizeFromProjectRoot(a, opts.root)))},
|
|
28
|
+
styles: ${JSON.stringify(opts.styles.map((s) => normalizeFromProjectRoot(s, opts.root)))},
|
|
29
|
+
scripts: ${JSON.stringify(opts.scripts.map((s) => normalizeFromProjectRoot(s, opts.root)))},
|
|
30
|
+
jit: ${opts.jit},
|
|
31
|
+
${opts.inlineStylesExtension
|
|
32
|
+
? `inlineStylesExtension: '${opts.inlineStylesExtension}'`
|
|
33
|
+
: ''},
|
|
34
|
+
fileReplacements: ${JSON.stringify(opts.fileReplacements ?? [])},${opts.stylePreprocessorOptions !== undefined
|
|
35
|
+
? `
|
|
36
|
+
stylePreprocessorOptions: ${JSON.stringify(opts.stylePreprocessorOptions)},`
|
|
37
|
+
: ''}
|
|
38
|
+
hasServer: ${opts.server || opts.ssrEntry ? true : false},
|
|
39
|
+
skipTypeChecking: false,
|
|
40
|
+
});
|
|
41
|
+
${existingWebpackConfigPath
|
|
42
|
+
? `
|
|
43
|
+
export default ${isExistingWebpackConfigFunction
|
|
44
|
+
? `async function (env, argv) {
|
|
45
|
+
const oldConfig = await baseWebpackConfig;
|
|
46
|
+
const browserConfig = baseConfig[0];
|
|
47
|
+
return oldConfig(browserConfig);`
|
|
48
|
+
: 'webpackMerge(baseConfig[0], baseWebpackConfig)'}
|
|
49
|
+
`
|
|
50
|
+
: ''}
|
|
51
|
+
`;
|
|
52
|
+
tree.write((0, devkit_1.joinPathFragments)(opts.root, 'rspack.config.ts'), configContents);
|
|
53
|
+
}
|
|
54
|
+
function normalizeFromProjectRoot(path, projectRoot) {
|
|
55
|
+
if (projectRoot === '.') {
|
|
56
|
+
if (!path.startsWith('./')) {
|
|
57
|
+
return `./${path}`;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return path;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else if (path.startsWith(projectRoot)) {
|
|
64
|
+
return path.replace(projectRoot, '.');
|
|
65
|
+
}
|
|
66
|
+
else if (!path.startsWith('./')) {
|
|
67
|
+
return `./${path}`;
|
|
68
|
+
}
|
|
69
|
+
return path;
|
|
70
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
export declare function getCustomWebpackConfig(tree: Tree, projectRoot: string, pathToCustomWebpackConfig: string): Promise<{
|
|
3
|
+
isWebpackConfigFunction: boolean;
|
|
4
|
+
normalizedPathToCustomWebpackConfig: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function convertWebpackConfigToUseNxModuleFederationPlugin(webpackConfigContents: string): string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomWebpackConfig = getCustomWebpackConfig;
|
|
4
|
+
exports.convertWebpackConfigToUseNxModuleFederationPlugin = convertWebpackConfigToUseNxModuleFederationPlugin;
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
9
|
+
const FILE_EXTENSION_REGEX = /\.[^.]+$/;
|
|
10
|
+
async function getCustomWebpackConfig(tree, projectRoot, pathToCustomWebpackConfig) {
|
|
11
|
+
const webpackConfigContents = tree.read(pathToCustomWebpackConfig, 'utf-8');
|
|
12
|
+
if (webpackConfigContents.includes('@nx/module-federation/angular') &&
|
|
13
|
+
webpackConfigContents.includes('withModuleFederation')) {
|
|
14
|
+
tree.write(pathToCustomWebpackConfig, convertWebpackConfigToUseNxModuleFederationPlugin(webpackConfigContents));
|
|
15
|
+
return {
|
|
16
|
+
isWebpackConfigFunction: false,
|
|
17
|
+
normalizedPathToCustomWebpackConfig: `./${(0, path_1.relative)(projectRoot, pathToCustomWebpackConfig).replace(FILE_EXTENSION_REGEX, '')}`,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const configFile = await (0, config_utils_1.loadConfigFile)((0, path_1.join)(tree.root, pathToCustomWebpackConfig));
|
|
21
|
+
const webpackConfig = 'default' in configFile ? configFile.default : configFile;
|
|
22
|
+
return {
|
|
23
|
+
isWebpackConfigFunction: typeof webpackConfig === 'function',
|
|
24
|
+
normalizedPathToCustomWebpackConfig: `./${(0, path_1.relative)(projectRoot, pathToCustomWebpackConfig).replace(FILE_EXTENSION_REGEX, '')}`,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function convertWebpackConfigToUseNxModuleFederationPlugin(webpackConfigContents) {
|
|
28
|
+
let newWebpackConfigContents = webpackConfigContents;
|
|
29
|
+
let ast = tsquery_1.tsquery.ast(webpackConfigContents);
|
|
30
|
+
const withModuleFederationImportNodes = (0, tsquery_1.tsquery)(ast, 'ImportDeclaration:has(StringLiteral[value=@nx/module-federation/angular])');
|
|
31
|
+
if (withModuleFederationImportNodes.length > 0) {
|
|
32
|
+
const withModuleFederationImportNode = withModuleFederationImportNodes[0];
|
|
33
|
+
newWebpackConfigContents = `${webpackConfigContents.slice(0, withModuleFederationImportNode.getStart())}import { NxModuleFederationPlugin } from '@nx/module-federation/rspack';${webpackConfigContents.slice(withModuleFederationImportNode.getEnd())}`;
|
|
34
|
+
ast = tsquery_1.tsquery.ast(newWebpackConfigContents);
|
|
35
|
+
const exportedWithModuleFederationNodes = (0, tsquery_1.tsquery)(ast, 'ExportAssignment:has(CallExpression > Identifier[name=withModuleFederation])');
|
|
36
|
+
if (exportedWithModuleFederationNodes.length > 0) {
|
|
37
|
+
const exportedWithModuleFederationNode = exportedWithModuleFederationNodes[0];
|
|
38
|
+
newWebpackConfigContents = `${newWebpackConfigContents.slice(0, exportedWithModuleFederationNode.getStart())}${newWebpackConfigContents.slice(exportedWithModuleFederationNode.getEnd())}
|
|
39
|
+
export default {
|
|
40
|
+
plugins: [
|
|
41
|
+
new NxModuleFederationPlugin(config, {
|
|
42
|
+
dts: false,
|
|
43
|
+
}),
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
devkit_1.logger.warn("Could not find 'export default withModuleFederation' in the webpack config file. Skipping conversion.");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const withModuleFederationRequireNodes = (0, tsquery_1.tsquery)(ast, 'VariableStatement:has(CallExpression > Identifier[name=withModuleFederation], StringLiteral[value=@nx/module-federation/angular])');
|
|
53
|
+
if (withModuleFederationRequireNodes.length > 0) {
|
|
54
|
+
const withModuleFederationRequireNode = withModuleFederationRequireNodes[0];
|
|
55
|
+
newWebpackConfigContents = `${webpackConfigContents.slice(0, withModuleFederationRequireNode.getStart())}const { NxModuleFederationPlugin } = require('@nx/module-federation/rspack');${webpackConfigContents.slice(withModuleFederationRequireNode.getEnd())}`;
|
|
56
|
+
ast = tsquery_1.tsquery.ast(newWebpackConfigContents);
|
|
57
|
+
const exportedWithModuleFederationNodes = (0, tsquery_1.tsquery)(ast, 'ExpressionStatement:has(BinaryExpression > PropertyAccessExpression:has(Identifier[name=module], Identifier[name=exports]), CallExpression:has(Identifier[name=withModuleFederation]))');
|
|
58
|
+
if (exportedWithModuleFederationNodes.length > 0) {
|
|
59
|
+
const exportedWithModuleFederationNode = exportedWithModuleFederationNodes[0];
|
|
60
|
+
newWebpackConfigContents = `${newWebpackConfigContents.slice(0, exportedWithModuleFederationNode.getStart())}${newWebpackConfigContents.slice(exportedWithModuleFederationNode.getEnd())}
|
|
61
|
+
module.exports = {
|
|
62
|
+
plugins: [
|
|
63
|
+
new NxModuleFederationPlugin({ config }, {
|
|
64
|
+
dts: false,
|
|
65
|
+
}),
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
devkit_1.logger.warn("Could not find 'module.exports = withModuleFederation' in the webpack config file. Skipping conversion.");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return newWebpackConfigContents;
|
|
75
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTsconfig = updateTsconfig;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function updateTsconfig(tree, projectRoot) {
|
|
6
|
+
const tsconfigPath = (0, devkit_1.joinPathFragments)(projectRoot, 'tsconfig.json');
|
|
7
|
+
const tsconfig = (0, devkit_1.readJson)(tree, tsconfigPath);
|
|
8
|
+
tsconfig['ts-node'] = {
|
|
9
|
+
compilerOptions: {
|
|
10
|
+
module: 'CommonJS',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
(0, devkit_1.writeJson)(tree, tsconfigPath, tsconfig);
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "GeneratorNxApp",
|
|
4
|
+
"title": "Creates an Angular application.",
|
|
5
|
+
"description": "Creates an Angular application.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"cli": "nx",
|
|
8
|
+
"properties": {
|
|
9
|
+
"project": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"aliases": ["name", "projectName"],
|
|
12
|
+
"description": "Project for which to convert to rspack.",
|
|
13
|
+
"$default": {
|
|
14
|
+
"$source": "argv",
|
|
15
|
+
"index": 0
|
|
16
|
+
},
|
|
17
|
+
"x-prompt": "Which project do you want to convert to rspack?",
|
|
18
|
+
"x-dropdown": "projects",
|
|
19
|
+
"x-priority": "important"
|
|
20
|
+
},
|
|
21
|
+
"skipFormat": {
|
|
22
|
+
"description": "Skip formatting files.",
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": false
|
|
25
|
+
},
|
|
26
|
+
"skipInstall": {
|
|
27
|
+
"description": "Skip installing dependencies.",
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { ServerModule } from '@angular/platform-server';<% if(serverRouting) { %>
|
|
3
|
-
import {
|
|
3
|
+
import { <%= provideServerRoutingFn %> } from '@angular/ssr';<% } %>
|
|
4
4
|
import { AppComponent } from './app.component';
|
|
5
5
|
import { AppModule } from './app.module';<% if(serverRouting) { %>
|
|
6
6
|
import { serverRoutes } from './app.routes.server';<% } %>
|
|
7
7
|
|
|
8
8
|
@NgModule({
|
|
9
9
|
imports: [AppModule, ServerModule],<% if(serverRouting) { %>
|
|
10
|
-
providers: [
|
|
10
|
+
providers: [<%= provideServerRoutingFn %>(serverRoutes)],<% } %>
|
|
11
11
|
bootstrap: [AppComponent],
|
|
12
12
|
})
|
|
13
13
|
export class <%= rootModuleClassName %> {}
|
|
@@ -61,6 +61,6 @@ if (isMainModule(import.meta.url)) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.
|
|
65
65
|
*/
|
|
66
66
|
export const reqHandler = createNodeRequestHandler(app);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
|
|
2
2
|
import { provideServerRendering } from '@angular/platform-server';<% if(serverRouting) { %>
|
|
3
|
-
import {
|
|
3
|
+
import { <%= provideServerRoutingFn %> } from '@angular/ssr';<% } %>
|
|
4
4
|
import { appConfig } from './app.config';<% if(serverRouting) { %>
|
|
5
5
|
import { serverRoutes } from './app.routes.server';<% } %>
|
|
6
6
|
|
|
7
7
|
const serverConfig: ApplicationConfig = {
|
|
8
8
|
providers: [
|
|
9
9
|
provideServerRendering()<% if(serverRouting) { %>,
|
|
10
|
-
|
|
10
|
+
<%= provideServerRoutingFn %>(serverRoutes)<% } %>
|
|
11
11
|
]
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -4,6 +4,7 @@ exports.generateSSRFiles = generateSSRFiles;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const version_utils_1 = require("../../utils/version-utils");
|
|
7
|
+
const semver_1 = require("semver");
|
|
7
8
|
function generateSSRFiles(tree, options) {
|
|
8
9
|
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
9
10
|
if (project.targets.server ||
|
|
@@ -24,7 +25,17 @@ function generateSSRFiles(tree, options) {
|
|
|
24
25
|
pathToFiles = (0, path_1.join)(baseFilesPath, 'pre-v19', options.standalone ? 'standalone-src' : 'ngmodule-src');
|
|
25
26
|
}
|
|
26
27
|
const sourceRoot = project.sourceRoot ?? (0, devkit_1.joinPathFragments)(project.root, 'src');
|
|
27
|
-
(0,
|
|
28
|
+
const ssrVersion = (0, version_utils_1.getInstalledPackageVersion)(tree, '@angular/ssr');
|
|
29
|
+
const cleanedSsrVersion = ssrVersion
|
|
30
|
+
? (0, semver_1.clean)(ssrVersion) ?? (0, semver_1.coerce)(ssrVersion).version
|
|
31
|
+
: null;
|
|
32
|
+
(0, devkit_1.generateFiles)(tree, pathToFiles, sourceRoot, {
|
|
33
|
+
...options,
|
|
34
|
+
provideServerRoutingFn: !cleanedSsrVersion || (0, semver_1.gte)(cleanedSsrVersion, '19.2.0')
|
|
35
|
+
? 'provideServerRouting'
|
|
36
|
+
: 'provideServerRoutesConfig',
|
|
37
|
+
tpl: '',
|
|
38
|
+
});
|
|
28
39
|
if (angularMajorVersion >= 19 && !options.serverRouting) {
|
|
29
40
|
tree.delete((0, devkit_1.joinPathFragments)(sourceRoot, 'app/app.routes.server.ts'));
|
|
30
41
|
}
|
|
@@ -19,7 +19,6 @@ function ensureAngularDependencies(tree) {
|
|
|
19
19
|
const rxjsVersion = (0, version_utils_1.getInstalledPackageVersion)(tree, 'rxjs') ?? pkgVersions.rxjsVersion;
|
|
20
20
|
const tsLibVersion = (0, version_utils_1.getInstalledPackageVersion)(tree, 'tslib') ?? pkgVersions.tsLibVersion;
|
|
21
21
|
const zoneJsVersion = (0, version_utils_1.getInstalledPackageVersion)(tree, 'zone.js') ?? pkgVersions.zoneJsVersion;
|
|
22
|
-
dependencies['@angular/animations'] = angularVersion;
|
|
23
22
|
dependencies['@angular/common'] = angularVersion;
|
|
24
23
|
dependencies['@angular/compiler'] = angularVersion;
|
|
25
24
|
dependencies['@angular/core'] = angularVersion;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.angularCliVersion = void 0;
|
|
4
|
+
exports.default = default_1;
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
exports.angularCliVersion = '~19.2.0';
|
|
7
|
+
async function default_1(tree) {
|
|
8
|
+
let shouldFormat = false;
|
|
9
|
+
(0, devkit_1.updateJson)(tree, 'package.json', (json) => {
|
|
10
|
+
if (json.devDependencies?.['@angular/cli']) {
|
|
11
|
+
json.devDependencies['@angular/cli'] = exports.angularCliVersion;
|
|
12
|
+
shouldFormat = true;
|
|
13
|
+
}
|
|
14
|
+
else if (json.dependencies?.['@angular/cli']) {
|
|
15
|
+
json.dependencies['@angular/cli'] = exports.angularCliVersion;
|
|
16
|
+
shouldFormat = true;
|
|
17
|
+
}
|
|
18
|
+
return json;
|
|
19
|
+
});
|
|
20
|
+
if (shouldFormat) {
|
|
21
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -6,6 +6,7 @@ exports.backwardCompatibleVersions = {
|
|
|
6
6
|
angularVersion: '~17.3.0',
|
|
7
7
|
angularDevkitVersion: '~17.3.0',
|
|
8
8
|
ngPackagrVersion: '~17.3.0',
|
|
9
|
+
ngRspackVersion: '~19.0.0-alpha.26',
|
|
9
10
|
ngrxVersion: '~17.0.0',
|
|
10
11
|
rxjsVersion: '~7.8.0',
|
|
11
12
|
zoneJsVersion: '~0.14.3',
|
|
@@ -33,6 +34,7 @@ exports.backwardCompatibleVersions = {
|
|
|
33
34
|
angularVersion: '~18.2.0',
|
|
34
35
|
angularDevkitVersion: '~18.2.0',
|
|
35
36
|
ngPackagrVersion: '~18.2.0',
|
|
37
|
+
ngRspackVersion: '~19.0.0-alpha.26',
|
|
36
38
|
ngrxVersion: '~18.0.2',
|
|
37
39
|
rxjsVersion: '~7.8.0',
|
|
38
40
|
zoneJsVersion: '~0.14.3',
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
|
-
export declare const angularVersion = "~19.
|
|
3
|
-
export declare const angularDevkitVersion = "~19.
|
|
4
|
-
export declare const ngPackagrVersion = "~19.
|
|
2
|
+
export declare const angularVersion = "~19.2.0";
|
|
3
|
+
export declare const angularDevkitVersion = "~19.2.0";
|
|
4
|
+
export declare const ngPackagrVersion = "~19.2.0";
|
|
5
|
+
export declare const ngRspackVersion = "~19.0.0-alpha.29";
|
|
5
6
|
export declare const ngrxVersion = "^19.0.0";
|
|
6
7
|
export declare const rxjsVersion = "~7.8.0";
|
|
7
8
|
export declare const zoneJsVersion = "~0.15.0";
|
|
@@ -12,8 +13,8 @@ export declare const typesCorsVersion = "~2.8.5";
|
|
|
12
13
|
export declare const expressVersion = "^4.21.2";
|
|
13
14
|
export declare const typesExpressVersion = "^4.17.21";
|
|
14
15
|
export declare const browserSyncVersion = "^3.0.0";
|
|
15
|
-
export declare const moduleFederationNodeVersion = "^2.6.
|
|
16
|
-
export declare const moduleFederationEnhancedVersion = "^0.
|
|
16
|
+
export declare const moduleFederationNodeVersion = "^2.6.26";
|
|
17
|
+
export declare const moduleFederationEnhancedVersion = "^0.9.0";
|
|
17
18
|
export declare const angularEslintVersion = "^19.0.2";
|
|
18
19
|
export declare const typescriptEslintVersion = "^7.16.0";
|
|
19
20
|
export declare const tailwindVersion = "^3.0.2";
|
package/src/utils/versions.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jsoncEslintParserVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.moduleFederationEnhancedVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.angularJsVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
|
|
3
|
+
exports.jsoncEslintParserVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.moduleFederationEnhancedVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.angularJsVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngRspackVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.angularVersion = '~19.
|
|
6
|
-
exports.angularDevkitVersion = '~19.
|
|
7
|
-
exports.ngPackagrVersion = '~19.
|
|
5
|
+
exports.angularVersion = '~19.2.0';
|
|
6
|
+
exports.angularDevkitVersion = '~19.2.0';
|
|
7
|
+
exports.ngPackagrVersion = '~19.2.0';
|
|
8
|
+
exports.ngRspackVersion = '~19.0.0-alpha.29';
|
|
8
9
|
exports.ngrxVersion = '^19.0.0';
|
|
9
10
|
exports.rxjsVersion = '~7.8.0';
|
|
10
11
|
exports.zoneJsVersion = '~0.15.0';
|
|
@@ -15,8 +16,8 @@ exports.typesCorsVersion = '~2.8.5';
|
|
|
15
16
|
exports.expressVersion = '^4.21.2';
|
|
16
17
|
exports.typesExpressVersion = '^4.17.21';
|
|
17
18
|
exports.browserSyncVersion = '^3.0.0';
|
|
18
|
-
exports.moduleFederationNodeVersion = '^2.6.
|
|
19
|
-
exports.moduleFederationEnhancedVersion = '^0.
|
|
19
|
+
exports.moduleFederationNodeVersion = '^2.6.26';
|
|
20
|
+
exports.moduleFederationEnhancedVersion = '^0.9.0';
|
|
20
21
|
exports.angularEslintVersion = '^19.0.2';
|
|
21
22
|
exports.typescriptEslintVersion = '^7.16.0';
|
|
22
23
|
exports.tailwindVersion = '^3.0.2';
|