@nx/webpack 0.0.0-pr-29720-06f67e5 → 0.0.0-pr-3-4fa8cf8
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/migrations.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-3-4fa8cf8",
|
|
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": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"webpack-dev-server": "^5.0.4",
|
|
67
67
|
"webpack-node-externals": "^3.0.0",
|
|
68
68
|
"webpack-subresource-integrity": "^5.1.0",
|
|
69
|
-
"@nx/devkit": "0.0.0-pr-
|
|
70
|
-
"@nx/js": "0.0.0-pr-
|
|
69
|
+
"@nx/devkit": "0.0.0-pr-3-4fa8cf8",
|
|
70
|
+
"@nx/js": "0.0.0-pr-3-4fa8cf8"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -48,7 +48,10 @@ function normalizeOptions(options) {
|
|
|
48
48
|
// executor options take precedence (especially for overriding with CLI args)
|
|
49
49
|
originalTargetOptions);
|
|
50
50
|
}
|
|
51
|
-
const sourceRoot = projectNode.data.sourceRoot ??
|
|
51
|
+
const sourceRoot = projectNode.data.sourceRoot ??
|
|
52
|
+
((0, fs_1.existsSync)((0, path_1.join)(devkit_1.workspaceRoot, projectNode.data.root, 'src'))
|
|
53
|
+
? (0, path_1.join)(projectNode.data.root, 'src')
|
|
54
|
+
: projectNode.data.root);
|
|
52
55
|
if (!combinedPluginAndMaybeExecutorOptions.main) {
|
|
53
56
|
throw new Error(`Missing "main" option for the entry file. Set this option in your Nx webpack plugin.`);
|
|
54
57
|
}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -120,6 +120,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
120
120
|
},
|
|
121
121
|
};
|
|
122
122
|
targets[options.serveTargetName] = {
|
|
123
|
+
continuous: true,
|
|
123
124
|
command: `webpack-cli serve`,
|
|
124
125
|
options: {
|
|
125
126
|
cwd: projectRoot,
|
|
@@ -139,6 +140,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
139
140
|
},
|
|
140
141
|
};
|
|
141
142
|
targets[options.previewTargetName] = {
|
|
143
|
+
continuous: true,
|
|
142
144
|
command: `webpack-cli serve`,
|
|
143
145
|
options: {
|
|
144
146
|
cwd: projectRoot,
|
|
@@ -158,6 +160,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
158
160
|
},
|
|
159
161
|
};
|
|
160
162
|
targets[options.serveStaticTargetName] = {
|
|
163
|
+
continuous: true,
|
|
161
164
|
dependsOn: [options.buildTargetName],
|
|
162
165
|
executor: '@nx/web:file-server',
|
|
163
166
|
options: {
|
|
@@ -5,7 +5,6 @@ const child_process_1 = require("child_process");
|
|
|
5
5
|
const client_1 = require("nx/src/daemon/client/client");
|
|
6
6
|
const watch_1 = require("nx/src/command-line/watch/watch");
|
|
7
7
|
const output_1 = require("nx/src/utils/output");
|
|
8
|
-
const enabled_1 = require("nx/src/daemon/client/enabled");
|
|
9
8
|
class WebpackNxBuildCoordinationPlugin {
|
|
10
9
|
constructor(buildCmd, skipInitialBuildOrOptions) {
|
|
11
10
|
this.buildCmd = buildCmd;
|
|
@@ -18,7 +17,7 @@ class WebpackNxBuildCoordinationPlugin {
|
|
|
18
17
|
this.buildChangedProjects();
|
|
19
18
|
}
|
|
20
19
|
if (!options?.skipWatchingDeps) {
|
|
21
|
-
if ((0,
|
|
20
|
+
if ((0, client_1.isDaemonEnabled)()) {
|
|
22
21
|
this.startWatchingBuildableLibs();
|
|
23
22
|
}
|
|
24
23
|
else {
|