fix(bundling): pass --force option to vite dev-server (#13905)

This commit is contained in:
Jack Hsu 2022-12-19 11:22:57 -05:00 committed by GitHub
parent 61d1d514ce
commit 49fa93b635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 0 deletions

View File

@ -214,6 +214,10 @@
"clearScreen": {
"description": "Set to false to prevent Vite from clearing the terminal screen when logging certain messages.",
"type": "boolean"
},
"force": {
"description": "Force the optimizer to ignore the cache and re-bundle",
"type": "boolean"
}
},
"definitions": {},
@ -303,6 +307,10 @@
"mode": {
"type": "string",
"description": "Mode to run the build in."
},
"force": {
"description": "Force the optimizer to ignore the cache and re-bundle",
"type": "boolean"
}
},
"definitions": {},

View File

@ -4,6 +4,7 @@ export interface ViteBuildExecutorOptions {
base?: string;
configFile?: string;
fileReplacements?: FileReplacement[];
force?: boolean;
sourcemap?: boolean | 'inline' | 'hidden';
minify?: boolean | 'esbuild' | 'terser';
manifest?: boolean | string;

View File

@ -113,6 +113,10 @@
"mode": {
"type": "string",
"description": "Mode to run the build in."
},
"force": {
"description": "Force the optimizer to ignore the cache and re-bundle",
"type": "boolean"
}
},
"definitions": {},

View File

@ -11,4 +11,5 @@ export interface ViteDevServerExecutorOptions {
logLevel?: info | warn | error | silent;
mode?: string;
clearScreen?: boolean;
force?: boolean;
}

View File

@ -75,6 +75,10 @@
"clearScreen": {
"description": "Set to false to prevent Vite from clearing the terminal screen when logging certain messages.",
"type": "boolean"
},
"force": {
"description": "Force the optimizer to ignore the cache and re-bundle",
"type": "boolean"
}
},
"definitions": {},

View File

@ -38,6 +38,7 @@ export async function getBuildAndSharedConfig(
options as ViteDevServerExecutorOptions & ViteBuildExecutorOptions,
projectRoot
),
optimizeDeps: { force: options.force },
} as InlineConfig);
}