Skip to content

Commit 3a27e14

Browse files
committedJul 11, 2024
feat!: make viteOptimizeDeps default to true
1 parent aa968ef commit 3a27e14

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

Diff for: ‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ AutoImport({
307307

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

312312
// Inject the imports at the end of other imports
313313
injectAtEnd: true,

Diff for: ‎src/core/unplugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default createUnplugin<Options>((options) => {
2323
},
2424
vite: {
2525
async config(config) {
26-
if (!options.viteOptimizeDeps)
26+
if (options.viteOptimizeDeps === false)
2727
return
2828

2929
const exclude = config.optimizeDeps?.exclude || []

Diff for: ‎src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export interface Options {
190190
/**
191191
* Include auto-imported packages in Vite's `optimizeDeps` option
192192
*
193-
* @default false
193+
* @default true
194194
*/
195195
viteOptimizeDeps?: boolean
196196
}

0 commit comments

Comments
 (0)
Please sign in to comment.