refactor(jsx-explorer): switch to rolldown-vite

This commit is contained in:
三咲智子 Kevin Deng
2025-08-10 09:21:41 +08:00
parent dd28b1e752
commit e5baab425e
3 changed files with 205 additions and 69 deletions

View File

@ -18,8 +18,6 @@
"devDependencies": {
"@types/babel__standalone": "^7.1.9",
"@vitejs/plugin-vue-jsx": "^5.0.1",
"terser": "^5.43.1",
"unplugin-replace": "^0.6.0",
"vite": "^7.1.1"
"vite": "npm:rolldown-vite@latest"
}
}

View File

@ -1,24 +1,14 @@
import { defineConfig } from 'vite';
import VueJSX from '@vitejs/plugin-vue-jsx';
import Replace from 'unplugin-replace/vite';
export default defineConfig({
build: {
minify: 'terser',
},
resolve: {
alias: {
'@vue/babel-plugin-jsx': '@vue/babel-plugin-jsx/src/index.ts',
},
},
plugins: [
VueJSX(),
Replace({
values: {
'process.env': '{}',
'process.env.NODE_DEBUG': 'false',
'process.env.BABEL_TYPES_8_BREAKING': 'false',
},
}),
],
experimental: {
enableNativePlugin: true,
},
plugins: [VueJSX()],
});