Closed glorydreamtop closed 3 years ago
使用命名空间组件,Tabs.TabPane
我也遇到了 引入 import { RadioGroup, Radio } from 'ant-design-vue'; yarn build 發生了問題, 使用命名空間組件是什麼意思
import { RadioGroup } from 'ant-design-vue/es/radio'; import { Radio } from 'ant-design-vue'; 分開引入解決了
⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭
描述 Bug
打包时出现以下报错信息,与 #40 表现相似: [vite]: Rollup failed to resolve import "F:/git/vben-admin-thin-next/node_modules/ant-design-vue/es/tab-pane/style/index" from "src\components\QuotaTree\src\QuotaTree.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
error during build: Error: [vite]: Rollup failed to resolve import "F:/git/vben-admin-thin-next/node_modules/ant-design-vue/es/tab-pane/style/index" from "src\components\QuotaTree\src\QuotaTree.vue?vue&type=script&setup=true&lang.ts". This is most likely unintended because it can break your application at runtime.我的业务代码只写了一个QuotaTree组件,其中引用了ant-design-vue的Tabs组件,import语句为:
import { Tabs, TabPane, AutoComplete } from 'ant-design-vue';
猜测是自动引入相关css文件导致复现 Bug
请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码
系统信息