fix(nextjs): cleanup old options for server executor (proxyConfig) (#17626)
This commit is contained in:
parent
bb88dd934a
commit
bfe8e47d23
@ -43,12 +43,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Hostname on which the application is served."
|
"description": "Hostname on which the application is served."
|
||||||
},
|
},
|
||||||
"proxyConfig": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Path to the proxy configuration file.",
|
|
||||||
"x-completion-type": "file",
|
|
||||||
"x-deprecated": "Use the built-in rewrite feature from Next.js. See: https://nextjs.org/docs/api-reference/next.config.js/rewrites"
|
|
||||||
},
|
|
||||||
"buildLibsFromSource": {
|
"buildLibsFromSource": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Read buildable libraries from source instead of building them separately.",
|
"description": "Read buildable libraries from source instead of building them separately.",
|
||||||
|
|||||||
@ -1,16 +1,8 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import {
|
import { ExecutorContext, parseTargetString, runExecutor } from '@nx/devkit';
|
||||||
ExecutorContext,
|
import { join } from 'path';
|
||||||
parseTargetString,
|
|
||||||
readTargetOptions,
|
|
||||||
runExecutor,
|
|
||||||
} from '@nx/devkit';
|
|
||||||
import { join, resolve } from 'path';
|
|
||||||
|
|
||||||
import {
|
import { NextServeBuilderOptions } from '../../utils/types';
|
||||||
NextBuildBuilderOptions,
|
|
||||||
NextServeBuilderOptions,
|
|
||||||
} from '../../utils/types';
|
|
||||||
|
|
||||||
export default async function* serveExecutor(
|
export default async function* serveExecutor(
|
||||||
options: NextServeBuilderOptions,
|
options: NextServeBuilderOptions,
|
||||||
@ -26,10 +18,6 @@ export default async function* serveExecutor(
|
|||||||
// Setting port that the custom server should use.
|
// Setting port that the custom server should use.
|
||||||
(process.env as any).PORT = options.port;
|
(process.env as any).PORT = options.port;
|
||||||
|
|
||||||
const buildOptions = readTargetOptions<NextBuildBuilderOptions>(
|
|
||||||
parseTargetString(options.buildTarget, context.projectGraph),
|
|
||||||
context
|
|
||||||
);
|
|
||||||
const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
|
const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
|
||||||
|
|
||||||
yield* runCustomServer(projectRoot, options, context);
|
yield* runCustomServer(projectRoot, options, context);
|
||||||
|
|||||||
@ -40,12 +40,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Hostname on which the application is served."
|
"description": "Hostname on which the application is served."
|
||||||
},
|
},
|
||||||
"proxyConfig": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Path to the proxy configuration file.",
|
|
||||||
"x-completion-type": "file",
|
|
||||||
"x-deprecated": "Use the built-in rewrite feature from Next.js. See: https://nextjs.org/docs/api-reference/next.config.js/rewrites"
|
|
||||||
},
|
|
||||||
"buildLibsFromSource": {
|
"buildLibsFromSource": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Read buildable libraries from source instead of building them separately.",
|
"description": "Read buildable libraries from source instead of building them separately.",
|
||||||
|
|||||||
@ -49,7 +49,6 @@ export interface NextServeBuilderOptions {
|
|||||||
buildTarget: string;
|
buildTarget: string;
|
||||||
customServerTarget?: string;
|
customServerTarget?: string;
|
||||||
hostname?: string;
|
hostname?: string;
|
||||||
proxyConfig?: string;
|
|
||||||
buildLibsFromSource?: boolean;
|
buildLibsFromSource?: boolean;
|
||||||
keepAliveTimeout?: number;
|
keepAliveTimeout?: number;
|
||||||
turbo?: boolean;
|
turbo?: boolean;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user