chore: 移除了 babel 编译流程
* 加快调试速度 * 旧版本浏览器本来也没办法支持了...
This commit is contained in:
@@ -19,8 +19,6 @@
|
|||||||
"@types/react": "npm:@types/react@18.3.1",
|
"@types/react": "npm:@types/react@18.3.1",
|
||||||
"@types/react-dom": "npm:@types/react-dom@18.3.1",
|
"@types/react-dom": "npm:@types/react-dom@18.3.1",
|
||||||
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@4.7.0",
|
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@4.7.0",
|
||||||
"vite-plugin-babel": "npm:vite-plugin-babel@1.3.2",
|
|
||||||
"@babel/preset-env": "npm:@babel/preset-env@7.28.3",
|
|
||||||
"react": "npm:react@18.3.1",
|
"react": "npm:react@18.3.1",
|
||||||
"react-dom": "npm:react-dom@18.3.1",
|
"react-dom": "npm:react-dom@18.3.1",
|
||||||
"vite": "npm:vite@7.0.6",
|
"vite": "npm:vite@7.0.6",
|
||||||
|
|||||||
@@ -1,27 +1,12 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import deno from '@deno/vite-plugin'
|
import deno from '@deno/vite-plugin'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
import pluginBabel from 'vite-plugin-babel'
|
|
||||||
import config from '../server/config.ts'
|
import config from '../server/config.ts'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react(), pluginBabel({
|
plugins: [react(), deno()],
|
||||||
babelConfig: {
|
|
||||||
presets: [
|
|
||||||
[
|
|
||||||
'@babel/preset-env',
|
|
||||||
{
|
|
||||||
targets: {
|
|
||||||
android: '70'
|
|
||||||
},
|
|
||||||
}
|
|
||||||
],
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}), deno()],
|
|
||||||
build: {
|
build: {
|
||||||
cssTarget: 'chrome70',
|
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
outDir: "." + config.data_path + '/page_compiled',
|
outDir: "." + config.data_path + '/page_compiled',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user