Skip to content

Commit

Permalink
feat!: make viteOptimizeDeps default to true
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 11, 2024
1 parent aa968ef commit 3a27e14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ AutoImport({

// Include auto-imported packages in Vite's `optimizeDeps` options
// Recommend to enable
viteOptimizeDeps: false,
viteOptimizeDeps: true,

// Inject the imports at the end of other imports
injectAtEnd: true,
Expand Down
2 changes: 1 addition & 1 deletion src/core/unplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default createUnplugin<Options>((options) => {
},
vite: {
async config(config) {
if (!options.viteOptimizeDeps)
if (options.viteOptimizeDeps === false)
return

const exclude = config.optimizeDeps?.exclude || []
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export interface Options {
/**
* Include auto-imported packages in Vite's `optimizeDeps` option
*
* @default false
* @default true
*/
viteOptimizeDeps?: boolean
}
Expand Down

0 comments on commit 3a27e14

Please sign in to comment.