@nx/webpack 19.8.0-beta.2 → 19.8.0-beta.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "19.8.0-beta.
|
|
3
|
+
"version": "19.8.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.",
|
|
6
6
|
"repository": {
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"webpack-dev-server": "^5.0.4",
|
|
70
70
|
"webpack-node-externals": "^3.0.0",
|
|
71
71
|
"webpack-subresource-integrity": "^5.1.0",
|
|
72
|
-
"@nx/devkit": "19.8.0-beta.
|
|
73
|
-
"@nx/js": "19.8.0-beta.
|
|
74
|
-
"@nrwl/webpack": "19.8.0-beta.
|
|
72
|
+
"@nx/devkit": "19.8.0-beta.3",
|
|
73
|
+
"@nx/js": "19.8.0-beta.3",
|
|
74
|
+
"@nrwl/webpack": "19.8.0-beta.3"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
@@ -76,6 +76,23 @@ function recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion
|
|
|
76
76
|
recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion, pkgRoot, mainEntryPointExports, subDirs, collectedPackages);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
function collectPackagesFromExports(pkgName, pkgVersion, exports, collectedPackages) {
|
|
80
|
+
for (const [relativeEntryPoint, exportOptions] of Object.entries(exports)) {
|
|
81
|
+
if (exportOptions?.['default']?.search(/\.(js|mjs|cjs)$/)) {
|
|
82
|
+
let entryPointName = (0, devkit_1.joinPathFragments)(pkgName, relativeEntryPoint);
|
|
83
|
+
if (entryPointName.endsWith('.json')) {
|
|
84
|
+
entryPointName = (0, path_1.dirname)(entryPointName);
|
|
85
|
+
}
|
|
86
|
+
if (entryPointName === '.') {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (collectedPackages.find((p) => p.name === entryPointName)) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
collectedPackages.push({ name: entryPointName, version: pkgVersion });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
79
96
|
function collectPackageSecondaryEntryPoints(pkgName, pkgVersion, collectedPackages) {
|
|
80
97
|
let pathToPackage;
|
|
81
98
|
let packageJsonPath;
|
|
@@ -97,6 +114,9 @@ function collectPackageSecondaryEntryPoints(pkgName, pkgVersion, collectedPackag
|
|
|
97
114
|
packageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
|
|
98
115
|
}
|
|
99
116
|
const { exports } = packageJson;
|
|
117
|
+
if (exports) {
|
|
118
|
+
collectPackagesFromExports(pkgName, pkgVersion, exports, collectedPackages);
|
|
119
|
+
}
|
|
100
120
|
const subDirs = getNonNodeModulesSubDirs(pathToPackage);
|
|
101
121
|
recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion, pathToPackage, exports, subDirs, collectedPackages);
|
|
102
122
|
}
|