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

View File

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

View File

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

View File

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

View File

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

View File

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