@nx/angular-rspack 20.8.0 → 20.8.2
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.
|
@@ -344,15 +344,25 @@ async function getProject(root) {
|
|
|
344
344
|
return undefined;
|
|
345
345
|
}
|
|
346
346
|
const projectGraph = await (0, graph_1.retrieveOrCreateProjectGraph)();
|
|
347
|
-
(0, node_assert_1.default)(projectGraph, 'Cannot find the project. Please make sure to run this task with the Nx CLI and set "root" to a directory contained in a project.');
|
|
348
347
|
let projectName = process.env.NX_TASK_TARGET_PROJECT;
|
|
349
|
-
if (
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
if (projectGraph) {
|
|
349
|
+
if (!projectName) {
|
|
350
|
+
const projectRootMappings = createProjectRootMappings(projectGraph.nodes);
|
|
351
|
+
projectName =
|
|
352
|
+
(0, find_project_for_path_1.findProjectForPath)(node_path_1.posix.relative(devkit_1.workspaceRoot, root), projectRootMappings) ?? undefined;
|
|
353
|
+
}
|
|
354
|
+
if (projectName) {
|
|
355
|
+
return projectGraph.nodes[projectName];
|
|
356
|
+
}
|
|
353
357
|
}
|
|
354
|
-
|
|
355
|
-
|
|
358
|
+
return {
|
|
359
|
+
name: undefined,
|
|
360
|
+
data: {
|
|
361
|
+
name: undefined,
|
|
362
|
+
root: root,
|
|
363
|
+
sourceRoot: undefined,
|
|
364
|
+
},
|
|
365
|
+
};
|
|
356
366
|
}
|
|
357
367
|
function createProjectRootMappings(nodes) {
|
|
358
368
|
const projectRootMappings = new Map();
|
|
@@ -15,7 +15,7 @@ function loader(content, opt) {
|
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
const { typescriptFileCache } = this._compilation[models_1.NG_RSPACK_SYMBOL_NAME]();
|
|
18
|
-
const request = this.resourcePath;
|
|
18
|
+
const request = this.resourcePath.replace(/^[A-Z]:/, '');
|
|
19
19
|
const normalizedRequest = (0, path_1.normalize)(request);
|
|
20
20
|
const templateUrls = templateUrlsResolver.resolve(content, normalizedRequest);
|
|
21
21
|
const styleUrls = styleUrlsResolver.resolve(content, normalizedRequest);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack",
|
|
3
|
-
"version": "20.8.
|
|
3
|
+
"version": "20.8.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"tslib": "^2.3.0",
|
|
65
65
|
"webpack-merge": "^6.0.1",
|
|
66
66
|
"ws": "^8.18.0",
|
|
67
|
-
"@nx/angular-rspack-compiler": "20.8.
|
|
67
|
+
"@nx/angular-rspack-compiler": "20.8.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@code-pushup/models": "^0.63.0",
|