Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果自行使用TableV2,并引入TableV2FixedDir时,会导致无法打包 #545

Open
Akemi-Madoka opened this issue Oct 9, 2024 · 2 comments

Comments

@Akemi-Madoka
Copy link

使用最新的2.9版本,
在任一组件引入TableV2FixedDir并使用,然后进行打包
即可触发报错:

ERROR error during build: 10:26:29
[vite]: Rollup failed to resolve import "E:/GIT/test/vue-element-plus-admin-2.9.0/node_modules/.pnpm/element-plus@2.7.7_vue@3.4.32_typescript@5.5.3_/node_modules/element-plus/es/components/table-v2-fixed-dir/style/css" from "E:/GIT/test/vue-element-plus-admin-2.9.0/src/views/Authorization/User/User.vue?vue&type=script&setup=true&lang.tsx".
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

@Akemi-Madoka
Copy link
Author

另:
引入”ElAutoResizer“组件时,也会触发类型的报错,请尽可能处理

@Akemi-Madoka
Copy link
Author

经过测试,问题来源于vite.config.ts中的'vite-plugin-style-import'自动拼接样式路径导致的问题,所以只有当打包参数VITE_USE_ALL_ELEMENT_PLUS_STYLE=false才会触发,即默认的"build:pro"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant