@nx/angular 19.8.0-canary.20240919-7f4a877 → 19.8.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/angular",
|
3
|
-
"version": "19.8.0
|
3
|
+
"version": "19.8.0",
|
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": {
|
@@ -80,14 +80,14 @@
|
|
80
80
|
"webpack-merge": "^5.8.0",
|
81
81
|
"webpack": "^5.88.0",
|
82
82
|
"@module-federation/enhanced": "~0.6.0",
|
83
|
-
"@nx/devkit": "19.8.0
|
84
|
-
"@nx/js": "19.8.0
|
85
|
-
"@nx/eslint": "19.8.0
|
86
|
-
"@nx/webpack": "19.8.0
|
87
|
-
"@nx/web": "19.8.0
|
88
|
-
"@nx/workspace": "19.8.0
|
83
|
+
"@nx/devkit": "19.8.0",
|
84
|
+
"@nx/js": "19.8.0",
|
85
|
+
"@nx/eslint": "19.8.0",
|
86
|
+
"@nx/webpack": "19.8.0",
|
87
|
+
"@nx/web": "19.8.0",
|
88
|
+
"@nx/workspace": "19.8.0",
|
89
89
|
"piscina": "^4.4.0",
|
90
|
-
"@nrwl/angular": "19.8.0
|
90
|
+
"@nrwl/angular": "19.8.0"
|
91
91
|
},
|
92
92
|
"peerDependencies": {
|
93
93
|
"@angular-devkit/build-angular": ">= 16.0.0 < 19.0.0",
|
@@ -7,6 +7,7 @@ const webpack_merge_1 = require("webpack-merge");
|
|
7
7
|
const internal_1 = require("@nx/js/src/internal");
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
9
9
|
const path_1 = require("path");
|
10
|
+
const fs_1 = require("fs");
|
10
11
|
async function mergeCustomWebpackConfig(baseWebpackConfig, pathToWebpackConfig, options, target) {
|
11
12
|
const customWebpackConfiguration = resolveCustomWebpackConfig(pathToWebpackConfig, options.tsConfig.startsWith(devkit_1.workspaceRoot)
|
12
13
|
? options.tsConfig
|
@@ -17,12 +18,37 @@ async function mergeCustomWebpackConfig(baseWebpackConfig, pathToWebpackConfig,
|
|
17
18
|
const config = await customWebpackConfiguration;
|
18
19
|
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
19
20
|
// for instance: `module.exports = async config => { ... }`.
|
21
|
+
let newConfig;
|
20
22
|
if (typeof config === 'function') {
|
21
|
-
|
23
|
+
newConfig = config(baseWebpackConfig, options, target);
|
22
24
|
}
|
23
25
|
else {
|
24
|
-
|
26
|
+
newConfig = (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
25
27
|
}
|
28
|
+
// license-webpack-plugin will at times try to scan the monorepo's root package.json
|
29
|
+
// This will result in an error being thrown
|
30
|
+
// Ensure root package.json is excluded
|
31
|
+
const licensePlugin = newConfig.plugins.find((p) => p.constructor.name === 'LicenseWebpackPlugin');
|
32
|
+
if (licensePlugin) {
|
33
|
+
let rootPackageJsonName;
|
34
|
+
const pathToRootPackageJson = (0, path_1.join)(newConfig.context.root ?? devkit_1.workspaceRoot, 'package.json');
|
35
|
+
if ((0, fs_1.existsSync)(pathToRootPackageJson)) {
|
36
|
+
try {
|
37
|
+
const rootPackageJson = JSON.parse((0, fs_1.readFileSync)(pathToRootPackageJson, 'utf-8'));
|
38
|
+
rootPackageJsonName = rootPackageJson.name;
|
39
|
+
licensePlugin.pluginOptions.excludedPackageTest = (pkgName) => {
|
40
|
+
if (!rootPackageJsonName) {
|
41
|
+
return false;
|
42
|
+
}
|
43
|
+
return pkgName === rootPackageJsonName;
|
44
|
+
};
|
45
|
+
}
|
46
|
+
catch {
|
47
|
+
// do nothing
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
return newConfig;
|
26
52
|
}
|
27
53
|
function resolveCustomWebpackConfig(path, tsConfig) {
|
28
54
|
const cleanupTranspiler = (0, internal_1.registerTsProject)(tsConfig);
|