fix: remove classnames from external to avoid ESM interop issues

This commit is contained in:
2026-02-20 22:00:32 +08:00
parent c72782f53a
commit 92fbf6d178

View File

@@ -30,6 +30,7 @@ export default defineConfig({
}, },
rollupOptions: { rollupOptions: {
// 外部化依赖(不打包进库) // 外部化依赖(不打包进库)
// 注意classnames 不设为 external让它打包进来避免 ESM/CommonJS 互操作问题
external: [ external: [
'vue', 'vue',
'element-plus', 'element-plus',
@@ -42,8 +43,7 @@ export default defineConfig({
'vue3-draggable-resizable', 'vue3-draggable-resizable',
'vuedraggable', 'vuedraggable',
'html2canvas', 'html2canvas',
'vue-i18n', 'vue-i18n'
'classnames'
], ],
output: { output: {
// 全局变量名 // 全局变量名