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:
parent
9fc7ffdaf3
commit
63282bc070
@ -59,6 +59,7 @@ exports[`@nx/webpack/plugin should create nodes 1`] = `
|
|||||||
},
|
},
|
||||||
"my-serve": {
|
"my-serve": {
|
||||||
"command": "webpack-cli serve",
|
"command": "webpack-cli serve",
|
||||||
|
"continuous": true,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Starts Webpack dev server",
|
"description": "Starts Webpack dev server",
|
||||||
"help": {
|
"help": {
|
||||||
@ -85,6 +86,7 @@ exports[`@nx/webpack/plugin should create nodes 1`] = `
|
|||||||
},
|
},
|
||||||
"preview-site": {
|
"preview-site": {
|
||||||
"command": "webpack-cli serve",
|
"command": "webpack-cli serve",
|
||||||
|
"continuous": true,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Starts Webpack dev server in production mode",
|
"description": "Starts Webpack dev server in production mode",
|
||||||
"help": {
|
"help": {
|
||||||
@ -110,6 +112,7 @@ exports[`@nx/webpack/plugin should create nodes 1`] = `
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
"serve-static": {
|
"serve-static": {
|
||||||
|
"continuous": true,
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"build-something",
|
"build-something",
|
||||||
],
|
],
|
||||||
|
|||||||
@ -217,6 +217,7 @@ async function createWebpackTargets(
|
|||||||
};
|
};
|
||||||
|
|
||||||
targets[options.serveTargetName] = {
|
targets[options.serveTargetName] = {
|
||||||
|
continuous: true,
|
||||||
command: `webpack-cli serve`,
|
command: `webpack-cli serve`,
|
||||||
options: {
|
options: {
|
||||||
cwd: projectRoot,
|
cwd: projectRoot,
|
||||||
@ -237,6 +238,7 @@ async function createWebpackTargets(
|
|||||||
};
|
};
|
||||||
|
|
||||||
targets[options.previewTargetName] = {
|
targets[options.previewTargetName] = {
|
||||||
|
continuous: true,
|
||||||
command: `webpack-cli serve`,
|
command: `webpack-cli serve`,
|
||||||
options: {
|
options: {
|
||||||
cwd: projectRoot,
|
cwd: projectRoot,
|
||||||
@ -257,6 +259,7 @@ async function createWebpackTargets(
|
|||||||
};
|
};
|
||||||
|
|
||||||
targets[options.serveStaticTargetName] = {
|
targets[options.serveStaticTargetName] = {
|
||||||
|
continuous: true,
|
||||||
dependsOn: [options.buildTargetName],
|
dependsOn: [options.buildTargetName],
|
||||||
executor: '@nx/web:file-server',
|
executor: '@nx/web:file-server',
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user