feat(webpack): add continuous inference support (#29974)

## Current Behavior
Webpack Inference Plugin does not currently infer `continuous` for
`serve, preview, serve-static` targets.

## Expected Behavior
Webpack Inference Plugin correctly infers `continuous: true`
This commit is contained in:
Colum Ferry 2025-02-11 16:32:57 +00:00 committed by Jason Jean
parent 9fc7ffdaf3
commit 63282bc070
2 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,7 @@ exports[`@nx/webpack/plugin should create nodes 1`] = `
},
"my-serve": {
"command": "webpack-cli serve",
"continuous": true,
"metadata": {
"description": "Starts Webpack dev server",
"help": {
@ -85,6 +86,7 @@ exports[`@nx/webpack/plugin should create nodes 1`] = `
},
"preview-site": {
"command": "webpack-cli serve",
"continuous": true,
"metadata": {
"description": "Starts Webpack dev server in production mode",
"help": {
@ -110,6 +112,7 @@ exports[`@nx/webpack/plugin should create nodes 1`] = `
},
},
"serve-static": {
"continuous": true,
"dependsOn": [
"build-something",
],

View File

@ -217,6 +217,7 @@ async function createWebpackTargets(
};
targets[options.serveTargetName] = {
continuous: true,
command: `webpack-cli serve`,
options: {
cwd: projectRoot,
@ -237,6 +238,7 @@ async function createWebpackTargets(
};
targets[options.previewTargetName] = {
continuous: true,
command: `webpack-cli serve`,
options: {
cwd: projectRoot,
@ -257,6 +259,7 @@ async function createWebpackTargets(
};
targets[options.serveStaticTargetName] = {
continuous: true,
dependsOn: [options.buildTargetName],
executor: '@nx/web:file-server',
options: {