vbenjs / vite-plugin-mock

A mock plugin for vite.use mockjs.
MIT License
617 stars 96 forks source link

线上部署报内存溢出:Maximum call stack size exceeded #122

Open anyone-yuren opened 10 months ago

anyone-yuren commented 10 months ago

image

image

尝试了2.9.6与2.9.8都是同样的问题。

Oct072021 commented 7 months ago

请问解决了吗

anyone-yuren commented 7 months ago

解决了,得看你具体的项目结构是怎么样的。如何注入生产环境的。

  1. mian文件写的是tsx,它只支持ts,把main.tsx => main.ts
  2. 如果是pnpm多包管理,检查下路径。

可以参考下我的项目配置: https://github.com/anyone-yuren/react-antd-admin-pnpm/blob/master/internal/vite-config/src/plugins/mock.ts

Oct072021 commented 7 months ago

受教了,感谢大佬!!