Skip to content

Commit 7246509

Browse files
authored
feat(native-plugin): use js oxc transform plugin in dev environment (#238)
1 parent 85f2db0 commit 7246509

File tree

1 file changed

+4
-1
lines changed
  • packages/vite/src/node/plugins

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ function resolveTsconfigTarget(target: string | undefined): number | 'next' {
270270
}
271271

272272
export function oxcPlugin(config: ResolvedConfig): Plugin {
273-
if (config.experimental.enableNativePlugin === true) {
273+
if (
274+
config.experimental.enableNativePlugin === true &&
275+
config.command === 'build'
276+
) {
274277
return perEnvironmentPlugin('native:transform', (environment) => {
275278
const {
276279
jsxInject,

0 commit comments

Comments
 (0)