@nx/webpack 19.8.2 → 19.8.4
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.
|
|
3
|
+
"version": "19.8.4",
|
|
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.
|
|
73
|
-
"@nx/js": "19.8.
|
|
74
|
-
"@nrwl/webpack": "19.8.
|
|
72
|
+
"@nx/devkit": "19.8.4",
|
|
73
|
+
"@nx/js": "19.8.4",
|
|
74
|
+
"@nrwl/webpack": "19.8.4"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
@@ -78,7 +78,10 @@ function recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion
|
|
|
78
78
|
}
|
|
79
79
|
function collectPackagesFromExports(pkgName, pkgVersion, exports, collectedPackages) {
|
|
80
80
|
for (const [relativeEntryPoint, exportOptions] of Object.entries(exports)) {
|
|
81
|
-
|
|
81
|
+
const defaultExportOptions = typeof exportOptions?.['default'] === 'string'
|
|
82
|
+
? exportOptions?.['default']
|
|
83
|
+
: exportOptions?.['default']?.['default'];
|
|
84
|
+
if (defaultExportOptions?.search(/\.(js|mjs|cjs)$/)) {
|
|
82
85
|
let entryPointName = (0, devkit_1.joinPathFragments)(pkgName, relativeEntryPoint);
|
|
83
86
|
if (entryPointName.endsWith('.json')) {
|
|
84
87
|
entryPointName = (0, path_1.dirname)(entryPointName);
|
|
@@ -222,8 +222,12 @@ function addStringDependencyToSharedConfig(sharedConfig, dependency, projectGrap
|
|
|
222
222
|
sharedConfig[dependency] = config;
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
const pkgJsonPath = require.resolve(`${dependency}/package.json`);
|
|
226
|
+
if (!pkgJsonPath) {
|
|
227
|
+
throw new Error(`Could not find package ${dependency} when applying it as a shared package. Are you sure it has been installed?`);
|
|
228
|
+
}
|
|
229
|
+
const pkgJson = (0, devkit_1.readJsonFile)(pkgJsonPath);
|
|
230
|
+
const config = getNpmPackageSharedConfig(dependency, pkgJson.version);
|
|
227
231
|
}
|
|
228
232
|
}
|
|
229
233
|
function getEmptySharedLibrariesConfig() {
|