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'
66type MaybeFalsy < T > = ( T ) | undefined | null | false
77type MaybeArray < T > = ( T ) | ( T ) [ ]
88
9+ interface ViteCompatiblePlugin extends Plugin {
10+ enforce : 'pre' | 'post'
11+ }
12+
913export interface ExternalsOptions {
1014
1115 /**
@@ -134,7 +138,7 @@ function nodeExternals(options: ExternalsOptions = {}): Plugin {
134138 return {
135139 name : name . replace ( / ^ r o l l u p - p l u g i n - / , '' ) ,
136140 version,
137- enforce : 'pre' , // For Vite
141+ enforce : 'pre' ,
138142
139143 async buildStart ( ) {
140144
@@ -259,7 +263,7 @@ function nodeExternals(options: ExternalsOptions = {}): Plugin {
259263 : null // normal handling
260264 }
261265 }
262- } as Plugin & { enforce : 'pre' | 'post' }
266+ } as ViteCompatiblePlugin
263267}
264268
265269export default nodeExternals
You can’t perform that action at this time.
0 commit comments