Skip to content

Commit 6ef8d05

Browse files
committed
chore: using oxc transform
1 parent 70e94ed commit 6ef8d05

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

packages/plugin-vue-jsx/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
5656
return {
5757
// only apply esbuild to ts files
5858
// since we are handling jsx and tsx now
59-
esbuild: {
59+
oxc: {
6060
include: /\.ts$/,
6161
},
6262
define: {

packages/plugin-vue/src/main.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { EncodedSourceMap as TraceEncodedSourceMap } from '@jridgewell/trac
77
import { TraceMap, eachMapping } from '@jridgewell/trace-mapping'
88
import type { EncodedSourceMap as GenEncodedSourceMap } from '@jridgewell/gen-mapping'
99
import { addMapping, fromMap, toEncodedMap } from '@jridgewell/gen-mapping'
10-
import { normalizePath, transformWithEsbuild } from 'rolldown-vite'
10+
import { normalizePath, transformWithOxc } from 'rolldown-vite'
1111
import {
1212
createDescriptor,
1313
getDescriptor,
@@ -256,15 +256,16 @@ export async function transformMain(
256256
/tsx?$/.test(lang) &&
257257
!descriptor.script?.src // only normal script can have src
258258
) {
259-
const { code, map } = await transformWithEsbuild(
259+
const { code, map } = await transformWithOxc(
260+
pluginContext,
260261
resolvedCode,
261262
filename,
262263
{
263264
target: 'esnext',
264265
// #430 support decorators in .vue file
265266
// target can be overridden by esbuild config target
266-
...options.devServer?.config.esbuild,
267-
loader: 'ts',
267+
...options.devServer?.config.oxc,
268+
lang: 'ts',
268269
sourcemap: options.sourceMap,
269270
},
270271
resolvedMap,

playground/vue-sourcemap/__tests__/__snapshots__/vue-sourcemap.spec.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ exports[`serve:vue-sourcemap > src imported sass > serve-src-imported-sass 1`] =
321321
exports[`serve:vue-sourcemap > ts > serve-ts 1`] = `
322322
{
323323
"ignoreList": [],
324-
"mappings": ";AAKA,QAAQ,IAAI,WAAW;;;;;AAIvB,YAAQ,IAAI,UAAU;;;;;;;;uBARpB,oBAAiB,WAAd,MAAU",
324+
"mappings": ";AAKA,QAAQ,IAAI,YAAW;;;;;AAIvB,UAAQ,IAAI,WAAU;;;;;;;;;;;sBARpB,oBAAiB,WAAd,OAAU",
325325
"sources": [
326326
"Ts.vue",
327327
],

0 commit comments

Comments
 (0)