You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalid define value (must be an entity name or valid JSON syntax): {"BASE_URL":"./","MODE":"production","DEV":false,"PROD":true,"LEGACY":__VITE_IS_LEGACY__}
#31
Closed
pfdgithub opened this issue
May 23, 2023
· 3 comments
在vite@4.3.8和@vitejs/plugin-legacy@4.0.3下,启用 options.build 配置后,执行npm run build会报错:
Invalid define value (must be an entity name or valid JSON syntax): {"BASE_URL":"./","MODE":"production","DEV":false,"PROD":true,"LEGACY":__VITE_IS_LEGACY__}
在
vite@4.3.8
和@vitejs/plugin-legacy@4.0.3
下,启用options.build
配置后,执行npm run build
会报错:生成了
mockServer
目录和文件,但mock-data.js
文件中是空的。可能与
babel
或rollup
版本有关?没往下查,可参考:vitejs/vite#2442
babel/babel#13017
rollup/plugins#838
The text was updated successfully, but these errors were encountered: