From c5ce13b13ce53a46732ae50021c41023f8af4e2b Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Fri, 3 Oct 2025 23:33:06 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B8=AC=E8=A9=A6=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=9B=B4=E8=88=8A=E7=9A=84=E7=80=8F=E8=A6=BD=E5=99=A8=E5=86=85?= =?UTF-8?q?=E6=A0=B8=20*=20=E6=95=88=E6=9E=9C=E4=B8=8D=E5=92=8B=E5=9C=B0,?= =?UTF-8?q?=20Edge=2084=20=E5=9B=A0=E7=88=B2=20Marked.js=20=E7=82=B8?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/deno.jsonc | 2 ++ client/vite.config.ts | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/deno.jsonc b/client/deno.jsonc index 0d27762..bf1351b 100644 --- a/client/deno.jsonc +++ b/client/deno.jsonc @@ -14,6 +14,8 @@ "@types/react": "npm:@types/react@18.3.1", "@types/react-dom": "npm:@types/react-dom@18.3.1", "@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-dom": "npm:react-dom@18.3.1", "vite": "npm:vite@7.0.6", diff --git a/client/vite.config.ts b/client/vite.config.ts index e0494a8..8cae720 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -1,13 +1,27 @@ import { defineConfig } from 'vite' import deno from '@deno/vite-plugin' import react from '@vitejs/plugin-react' - +import pluginBabel from 'vite-plugin-babel' import config from '../server/config.ts' // https://vite.dev/config/ export default defineConfig({ - plugins: [deno(), react()], + plugins: [react(), pluginBabel({ + babelConfig: { + presets: [ + [ + '@babel/preset-env', + { + targets: { + android: '70' + }, + } + ], + ], + } + }), deno()], build: { + cssTarget: 'chrome70', sourcemap: true, outDir: "." + config.data_path + '/page_compiled', },