Vite 编译问题?

新项目部署打包通过飞书打开直接是白屏(安卓白屏苹果正常),猜测是 vite 打包的 es 版本太高,然后改为 2015 现在能打开了,但样式又没有,但 es2015 已经最低了?还能怎么弄?

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  build: {
    target: "es2015"
  }
})
阅读 1.9k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题