打包生产时报错
leehave opened this issue · 2 comments
描述 Bug
[vite]: Rollup failed to resolve import "/Users/xxx/Documents/Vue/ant-design-vue/es/config-provider/style/index" from "src/App.vue?vue&type=script&setup=true&lang.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to
build.rollupOptions.externalerror during build: Error: [vite]: Rollup failed to resolve import "/Users/xxx/Documents/Vue/ant-design-vue/es/config-provider/style/index" from "src/App.vue?vue&type=script&setup=true&lang.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to
build.rollupOptions.external at onRollupWarning (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/_vite@2.5.0@vite/dist/node/chunks/dep-98dbe93b.js:52150:19) at onwarn (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/_vite@2.5.0@vite/dist/node/chunks/dep-98dbe93b.js:51935:13) at Object.onwarn (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/_rollup@2.56.3@rollup/dist/shared/rollup.js:20515:13) at ModuleLoader.handleResolveId (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/_rollup@2.56.3@rollup/dist/shared/rollup.js:19864:26) at /Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/_rollup@2.56.3@rollup/dist/shared/rollup.js:19856:26 at processTicksAndRejections (internal/process/task_queues.js:93:5)
请清晰地描述此 Bug 的具体表现。
复现 Bug
请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码
系统信息
- 操作系统: Mac OS
- Node 版本: 14.15.1
- 包管理器 (npm/yarn/pnpm) 及其版本: 6.14.9
我也遇到了这个问题,看了一圈都没有找到解决方案。
我也遇到过这个问题,看过一圈都没有找到解决方案。
我重新拉新的代码下来重新跑,就没有问题了