From 5bfdbe6cd6c50e673f89a735f0f94d0ecfd4adbd Mon Sep 17 00:00:00 2001 From: underfin Date: Thu, 17 Oct 2024 17:48:37 +0800 Subject: [PATCH] feat: export transformWithOxc (#62) --- packages/vite/index.cjs | 1 + packages/vite/rollup.dts.config.ts | 3 ++- packages/vite/src/node/index.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/vite/index.cjs b/packages/vite/index.cjs index 70515aa90c7a8d..520c58c7cccc38 100644 --- a/packages/vite/index.cjs +++ b/packages/vite/index.cjs @@ -15,6 +15,7 @@ const asyncFunctions = [ 'createServer', 'preview', 'transformWithEsbuild', + 'transformWithOxc', 'resolveConfig', 'optimizeDeps', 'formatPostcssSourceMap', diff --git a/packages/vite/rollup.dts.config.ts b/packages/vite/rollup.dts.config.ts index 2e55b60f97d5cc..f34d9e14ee5172 100644 --- a/packages/vite/rollup.dts.config.ts +++ b/packages/vite/rollup.dts.config.ts @@ -51,10 +51,11 @@ const identifierReplacements: Record> = { Plugin$1: 'rolldown.Plugin', PluginContext$1: 'rolldown.PluginContext', TransformPluginContext$1: 'rolldown.TransformPluginContext', - TransformResult$2: 'rolldown.TransformResult', + TransformResult$3: 'rolldown.TransformResult', }, 'rolldown/experimental': { TransformOptions$2: 'rolldown_experimental_TransformOptions', + TransformResult$2: 'rolldown_experimental_TransformResult', }, esbuild: { TransformResult$1: 'esbuild_TransformResult', diff --git a/packages/vite/src/node/index.ts b/packages/vite/src/node/index.ts index 8d6d86b32dc311..8c537060cbcf2c 100644 --- a/packages/vite/src/node/index.ts +++ b/packages/vite/src/node/index.ts @@ -19,6 +19,7 @@ export { createIdResolver } from './idResolver' export { formatPostcssSourceMap, preprocessCSS } from './plugins/css' export { transformWithEsbuild } from './plugins/esbuild' +export { transformWithOxc } from './plugins/oxc' export { buildErrorMessage } from './server/middlewares/error' export {