File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ const UMD_BEGIN_RE = /\(this,\s*function\([^()]*\)\s*\{\s*"use strict";/
33
33
const jsxExtensionsRE = / \. (?: j | t ) s x \b /
34
34
const validExtensionRE = / \. \w + $ /
35
35
36
- export interface OxcOptions extends OxcTransformOptions {
36
+ export interface OxcOptions
37
+ extends Exclude <
38
+ OxcTransformOptions ,
39
+ 'cwd' | 'sourceType' | 'lang' | 'sourcemap' | 'helpers'
40
+ > {
37
41
include ?: string | RegExp | ReadonlyArray < string | RegExp >
38
42
exclude ?: string | RegExp | ReadonlyArray < string | RegExp >
39
43
jsxInject ?: string
@@ -321,6 +325,9 @@ export function oxcPlugin(config: ResolvedConfig): Plugin {
321
325
) {
322
326
oxcTransformOptions . lang = 'jsx'
323
327
}
328
+ oxcTransformOptions . sourcemap =
329
+ this . environment . mode !== 'build' ||
330
+ ! ! this . environment . config . build . sourcemap
324
331
325
332
const result = await transformWithOxc (
326
333
this ,
You can’t perform that action at this time.
0 commit comments