Skip to content

Commit 04add45

Browse files
committed
Add Vite's apply: 'build' property
1 parent 07427b3 commit 04add45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ type MaybeFalsy<T> = (T) | undefined | null | false
77
type MaybeArray<T> = (T) | (T)[]
88

99
interface ViteCompatiblePlugin extends Plugin {
10-
enforce: 'pre' | 'post'
10+
apply?: 'build' | 'serve'
11+
enforce?: 'pre' | 'post'
1112
}
1213

1314
export interface ExternalsOptions {
@@ -138,6 +139,7 @@ function nodeExternals(options: ExternalsOptions = {}): Plugin {
138139
return {
139140
name: name.replace(/^rollup-plugin-/, ''),
140141
version,
142+
apply: 'build',
141143
enforce: 'pre',
142144

143145
async buildStart() {

0 commit comments

Comments
 (0)