vite开发环境正常,打包正式环境报错concat is not a function,求大佬帮忙看看 刚开始打包就报错,后来配置了@rollup/plugin-commonjs打包成功 然后打包后的文件打开就报错,弄一上午了,开发环境都正常 从描述中推测,是用到了某个不支持 CommonJS 或者不支持 ESM 的库,因为开发环境都是 ESM,所以没问题;但是构建后就...
vite 生产打包后报错 xx is not a constructor 版本 vite: "^5.0.11" 解决方法 添加optimizeDeps.disabled = false 和build.commonjsOptions.include = []。 vite.config.ts import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react(...
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported tovuejs/coreinstead. Check that this is a concrete bug. For Q&A open aGitHub Discussionor join ourDiscord Chat Server. The provided reproduction ...
React+Antd打包部署之后报错: ReferenceError: require is not defined 看错误信息应该是react-dom文件里用到了require,但是路由好像没问题,是点击按钮的时候报错了,整个页面不能看 错误信息截图: vite.config.js代码: import { defineConfig,splitVendorChunkPlugin }from'vite'import reactfrom'@vitejs/plugin-react-...
vite打包后项目报错concat is not a function? vite开发环境正常,打包正式环境报错concat is not a function,求大佬帮忙看看 刚开始打包就报错,后来配置了@rollup/plugin-commonjs打包成功 然后打包后的文件打开就报错,弄一上午了,开发环境都正常