cloydlau / json-editor-vue

Vue and Nuxt 2/3 isomorphic JSON editor, viewer, formatter and validator.
https://cloydlau.github.io/playground/json-editor-vue/
MIT License
437 stars 26 forks source link

火狐浏览器68版本 无法兼容 报错信息如下 #100

Closed programmerguohuajing closed 1 week ago

programmerguohuajing commented 1 week ago

Before you start, please make sure to:

Link to minimal reproduction

截图

Validation

Describe the bug and steps to reproduce

火狐浏览器68版本 无法兼容 image cf58862988afa5d324ebded8309bec6e

System Info

No response

Package Manager

npm

cloydlau commented 1 week ago

火狐68是2019年推出的版本,Vite 默认也是不支持的(Vite 目前要求至少火狐78)。

提供一个思路供参考,如果还是不行你可以自行调研下并分享下解决方案:

npm i -D @vitejs/plugin-legacy terser
// vite.config.js
import legacy from '@vitejs/plugin-legacy'

export default {
  optimizeDeps: {
    include: ['json-editor-vue'],
  },
  plugins: [
    legacy({
      targets: ['defaults', 'not IE 11'],
    }),
  ],
}
programmerguohuajing commented 1 week ago

好的 感谢楼主分享 我试试

cloydlau commented 1 week ago

没事,可考虑下点亮 Star 以支持本项目。