File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ import type { Plugin } from 'rollup'
6
6
type MaybeFalsy < T > = ( T ) | undefined | null | false
7
7
type MaybeArray < T > = ( T ) | ( T ) [ ]
8
8
9
+ interface ViteCompatiblePlugin extends Plugin {
10
+ enforce : 'pre' | 'post'
11
+ }
12
+
9
13
export interface ExternalsOptions {
10
14
11
15
/**
@@ -134,7 +138,7 @@ function nodeExternals(options: ExternalsOptions = {}): Plugin {
134
138
return {
135
139
name : name . replace ( / ^ r o l l u p - p l u g i n - / , '' ) ,
136
140
version,
137
- enforce : 'pre' , // For Vite
141
+ enforce : 'pre' ,
138
142
139
143
async buildStart ( ) {
140
144
@@ -259,7 +263,7 @@ function nodeExternals(options: ExternalsOptions = {}): Plugin {
259
263
: null // normal handling
260
264
}
261
265
}
262
- } as Plugin & { enforce : 'pre' | 'post' }
266
+ } as ViteCompatiblePlugin
263
267
}
264
268
265
269
export default nodeExternals
You can’t perform that action at this time.
0 commit comments