fix(bundling): pass nxext options to our executor (#13587)
This commit is contained in:
parent
c60d52af9b
commit
d5f834a3b6
@ -224,11 +224,6 @@
|
|||||||
"description": "Base public path when served in development or production.",
|
"description": "Base public path when served in development or production.",
|
||||||
"alias": "baseHref"
|
"alias": "baseHref"
|
||||||
},
|
},
|
||||||
"proxyConfig": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Path to the proxy configuration file.",
|
|
||||||
"x-completion-type": "file"
|
|
||||||
},
|
|
||||||
"configFile": {
|
"configFile": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The name of the Vite.js configuration file.",
|
"description": "The name of the Vite.js configuration file.",
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import type { FileReplacement } from '../../plugins/rollup-replace-files.plugin'
|
|||||||
export interface ViteBuildExecutorOptions {
|
export interface ViteBuildExecutorOptions {
|
||||||
outputPath: string;
|
outputPath: string;
|
||||||
base?: string;
|
base?: string;
|
||||||
proxyConfig?: string;
|
|
||||||
configFile?: string;
|
configFile?: string;
|
||||||
fileReplacements?: FileReplacement[];
|
fileReplacements?: FileReplacement[];
|
||||||
sourcemap?: boolean | 'inline' | 'hidden';
|
sourcemap?: boolean | 'inline' | 'hidden';
|
||||||
|
|||||||
@ -22,11 +22,6 @@
|
|||||||
"description": "Base public path when served in development or production.",
|
"description": "Base public path when served in development or production.",
|
||||||
"alias": "baseHref"
|
"alias": "baseHref"
|
||||||
},
|
},
|
||||||
"proxyConfig": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Path to the proxy configuration file.",
|
|
||||||
"x-completion-type": "file"
|
|
||||||
},
|
|
||||||
"configFile": {
|
"configFile": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The name of the Vite.js configuration file.",
|
"description": "The name of the Vite.js configuration file.",
|
||||||
|
|||||||
@ -138,6 +138,12 @@ export function addOrChangeBuildTarget(
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (targets[target]) {
|
if (targets[target]) {
|
||||||
|
buildOptions.fileReplacements = targets[target].options.fileReplacements;
|
||||||
|
|
||||||
|
if (target === '@nxext/vite:build') {
|
||||||
|
buildOptions.base = targets[target].options.baseHref;
|
||||||
|
buildOptions.sourcemap = targets[target].options.sourcemaps;
|
||||||
|
}
|
||||||
targets[target].options = {
|
targets[target].options = {
|
||||||
...buildOptions,
|
...buildOptions,
|
||||||
};
|
};
|
||||||
@ -179,6 +185,9 @@ export function addOrChangeServeTarget(
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (targets[target]) {
|
if (targets[target]) {
|
||||||
|
if (target === '@nxext/vite:dev') {
|
||||||
|
serveOptions.proxyConfig = targets[target].options.proxyConfig;
|
||||||
|
}
|
||||||
targets[target].options = {
|
targets[target].options = {
|
||||||
...serveOptions,
|
...serveOptions,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user