File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ Pass an object to `externalizeDeps` to override the default configuration.
39
39
// These are the default values.
40
40
externalizeDeps ({
41
41
deps: true ,
42
+ optionalDeps: true ,
42
43
peerDeps: true ,
43
44
useFile: join (process .cwd (), ' package.json' ),
44
45
})
Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ import type { Plugin } from 'vite'
4
4
5
5
interface UserOptions {
6
6
deps : boolean ,
7
+ optionalDeps : boolean ,
7
8
peerDeps : boolean ,
8
9
useFile : string ,
9
10
}
10
11
11
12
export const externalizeDeps = ( options : Partial < UserOptions > = { } ) : Plugin => {
12
13
const optionsResolved : UserOptions = {
13
14
deps : true ,
15
+ optionalDeps : true ,
14
16
peerDeps : true ,
15
17
useFile : join ( process . cwd ( ) , 'package.json' ) ,
16
18
// User options take priority.
You can’t perform that action at this time.
0 commit comments