@nx/webpack 18.2.4 → 18.3.0-beta.1
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 +4 -4
- package/src/plugins/plugin.js +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.0-beta.1",
|
|
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": {
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"webpack-dev-server": "^4.9.3",
|
|
64
64
|
"webpack-node-externals": "^3.0.0",
|
|
65
65
|
"webpack-subresource-integrity": "^5.1.0",
|
|
66
|
-
"@nx/devkit": "18.
|
|
67
|
-
"@nx/js": "18.
|
|
68
|
-
"@nrwl/webpack": "18.
|
|
66
|
+
"@nx/devkit": "18.3.0-beta.1",
|
|
67
|
+
"@nx/js": "18.3.0-beta.1",
|
|
68
|
+
"@nrwl/webpack": "18.3.0-beta.1"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
package/src/plugins/plugin.js
CHANGED
|
@@ -110,7 +110,7 @@ function normalizeOutputPath(outputPath, projectRoot) {
|
|
|
110
110
|
if (!outputPath) {
|
|
111
111
|
// If outputPath is undefined, use webpack's default `dist` directory.
|
|
112
112
|
if (projectRoot === '.') {
|
|
113
|
-
return `{projectRoot}/dist
|
|
113
|
+
return `{projectRoot}/dist`;
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
116
116
|
return `{workspaceRoot}/dist/{projectRoot}`;
|
|
@@ -118,7 +118,11 @@ function normalizeOutputPath(outputPath, projectRoot) {
|
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
120
120
|
if ((0, path_1.isAbsolute)(outputPath)) {
|
|
121
|
-
|
|
121
|
+
/**
|
|
122
|
+
* If outputPath is absolute, we need to resolve it relative to the workspaceRoot first.
|
|
123
|
+
* After that, we can use the relative path to the workspaceRoot token {workspaceRoot} to generate the output path.
|
|
124
|
+
*/
|
|
125
|
+
return `{workspaceRoot}/${(0, path_1.relative)(devkit_1.workspaceRoot, (0, path_1.resolve)(devkit_1.workspaceRoot, outputPath))}`;
|
|
122
126
|
}
|
|
123
127
|
else {
|
|
124
128
|
if (outputPath.startsWith('..')) {
|