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', },