@nx/webpack 22.6.3 → 22.6.5
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": "22.6.
|
|
3
|
+
"version": "22.6.5",
|
|
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": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"parse5": "4.0.0",
|
|
50
50
|
"postcss": "^8.4.38",
|
|
51
51
|
"postcss-import": "~14.1.0",
|
|
52
|
-
"postcss-loader": "^
|
|
52
|
+
"postcss-loader": "^8.2.1",
|
|
53
53
|
"rxjs": "^7.8.0",
|
|
54
54
|
"sass": "^1.85.0",
|
|
55
55
|
"sass-embedded": "^1.83.4",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"webpack-dev-server": "^5.2.1",
|
|
65
65
|
"webpack-node-externals": "^3.0.0",
|
|
66
66
|
"webpack-subresource-integrity": "^5.1.0",
|
|
67
|
-
"@nx/devkit": "22.6.
|
|
68
|
-
"@nx/js": "22.6.
|
|
67
|
+
"@nx/devkit": "22.6.5",
|
|
68
|
+
"@nx/js": "22.6.5"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"nx": "22.6.
|
|
71
|
+
"nx": "22.6.5"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAIlB,aAAa,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAIlB,aAAa,EASd,MAAM,YAAY,CAAC;AAapB,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAeD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,oBAAoB,CAiC3D,CAAC;AAEF,eAAO,MAAM,aAAa,qCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -13,7 +13,6 @@ const path_1 = require("path");
|
|
|
13
13
|
const read_webpack_options_1 = require("../utils/webpack/read-webpack-options");
|
|
14
14
|
const resolve_user_defined_webpack_config_1 = require("../utils/webpack/resolve-user-defined-webpack-config");
|
|
15
15
|
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
16
|
-
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
17
16
|
function readTargetsCache(cachePath) {
|
|
18
17
|
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
19
18
|
}
|
|
@@ -36,8 +35,9 @@ exports.createNodes = [
|
|
|
36
35
|
const targetsCache = readTargetsCache(cachePath);
|
|
37
36
|
const normalizedOptions = normalizeOptions(options);
|
|
38
37
|
const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
|
|
38
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
39
39
|
try {
|
|
40
|
-
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, isTsSolutionSetup), configFilePaths, normalizedOptions, context);
|
|
40
|
+
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, isTsSolutionSetup, pmc), configFilePaths, normalizedOptions, context);
|
|
41
41
|
}
|
|
42
42
|
finally {
|
|
43
43
|
writeTargetsToCache(cachePath, targetsCache);
|
|
@@ -45,7 +45,7 @@ exports.createNodes = [
|
|
|
45
45
|
},
|
|
46
46
|
];
|
|
47
47
|
exports.createNodesV2 = exports.createNodes;
|
|
48
|
-
async function createNodesInternal(configFilePath, options, context, targetsCache, isTsSolutionSetup) {
|
|
48
|
+
async function createNodesInternal(configFilePath, options, context, targetsCache, isTsSolutionSetup, pmc) {
|
|
49
49
|
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
50
50
|
// Do not create a project if package.json and project.json isn't there.
|
|
51
51
|
const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
|
|
@@ -54,7 +54,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
54
54
|
return {};
|
|
55
55
|
}
|
|
56
56
|
const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
|
|
57
|
-
targetsCache[hash] ??= await createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup);
|
|
57
|
+
targetsCache[hash] ??= await createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup, pmc);
|
|
58
58
|
const { targets, metadata } = targetsCache[hash];
|
|
59
59
|
return {
|
|
60
60
|
projects: {
|
|
@@ -66,7 +66,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
66
66
|
},
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
async function createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup) {
|
|
69
|
+
async function createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup, pmc) {
|
|
70
70
|
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
71
71
|
const webpackConfig = (0, resolve_user_defined_webpack_config_1.resolveUserDefinedWebpackConfig)((0, path_1.join)(context.workspaceRoot, configFilePath), (0, js_1.getRootTsConfigPath)(), true);
|
|
72
72
|
const webpackOptions = await (0, read_webpack_options_1.readWebpackOptions)(webpackConfig);
|
|
@@ -203,10 +203,10 @@ function normalizeOutputPath(outputPath, projectRoot) {
|
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
205
|
if (outputPath.startsWith('..')) {
|
|
206
|
-
return (0,
|
|
206
|
+
return (0, devkit_1.joinPathFragments)('{workspaceRoot}', projectRoot, outputPath);
|
|
207
207
|
}
|
|
208
208
|
else {
|
|
209
|
-
return (0,
|
|
209
|
+
return (0, devkit_1.joinPathFragments)('{projectRoot}', outputPath);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|