Skip to content

Commit c45adb3

Browse files
authored
feat(native-plugin): use js define plugin in dev environment (#298)
1 parent 5c0dddb commit c45adb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/plugins/define.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export function definePlugin(config: ResolvedConfig): Plugin {
109109
return pattern
110110
}
111111

112-
if (config.experimental.enableNativePlugin === true) {
112+
if (config.experimental.enableNativePlugin === true && isBuild) {
113113
return {
114114
name: 'vite:define',
115115
options(option) {

0 commit comments

Comments
 (0)