Skip to content

Commit

Permalink
fix(bundling): pass --force option to vite dev-server (#13905)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Dec 19, 2022
1 parent 61d1d51 commit 49fa93b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
8 changes: 8 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 Expand Up @@ -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": {},
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

1 comment on commit 49fa93b

@vercel
Copy link

@vercel vercel bot commented on 49fa93b Dec 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.