Open hcg1023 opened 2 years ago
In vite library mode, enable global and external in rollupOptions and add ant-design-vue, which will still be packaged into the product
https://github.com/hcg1023/vite-unplugin-vue-components-bug
build: { target: 'es2015', lib: { entry: path.resolve(process.cwd(), `src/index.ts`), name: 'CustomControl', formats: ['umd'], fileName: 'CustomControl', }, cssCodeSplit: true, rollupOptions: { external: [ 'vue', 'ant-design-vue', ], output: { globals: { vue: 'Vue', 'ant-design-vue': 'antd', }, }, }, }
got same problem
Tried to use 'external: [/xx/]' writing and found that it can be done, but I don't know if there will be any other problems
In vite library mode, enable global and external in rollupOptions and add ant-design-vue, which will still be packaged into the product
https://github.com/hcg1023/vite-unplugin-vue-components-bug