Skip to content

Commit

Permalink
fix(bundling): pass --force option to vite dev-server
Browse files Browse the repository at this point in the history
Fixes: #13700
  • Loading branch information
jaysoo authored and Jack Hsu committed Dec 19, 2022
1 parent 20c4782 commit cfee4b5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/generated/packages/vite.json
Expand Up @@ -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": {},
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/executors/build/schema.d.ts
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions packages/vite/src/executors/build/schema.json
Expand Up @@ -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": {},
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/executors/dev-server/schema.d.ts
Expand Up @@ -11,4 +11,5 @@ export interface ViteDevServerExecutorOptions {
logLevel?: info | warn | error | silent;
mode?: string;
clearScreen?: boolean;
force?: boolean;
}
4 changes: 4 additions & 0 deletions packages/vite/src/executors/dev-server/schema.json
Expand Up @@ -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": {},
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/utils/options-utils.ts
Expand Up @@ -38,6 +38,7 @@ export async function getBuildAndSharedConfig(
options as ViteDevServerExecutorOptions & ViteBuildExecutorOptions,
projectRoot
),
optimizeDeps: { force: options.force },
} as InlineConfig);
}

Expand Down

0 comments on commit cfee4b5

Please sign in to comment.