externalize npm packages in ui package

This commit is contained in:
Gregor Vostrak
2026-03-05 15:56:02 +01:00
parent 5646aedb25
commit e43ce477b8
2 changed files with 26 additions and 1 deletions

View File

@@ -55,11 +55,16 @@
"@heroicons/vue": "^2.1.5",
"@vitejs/plugin-vue": "^5.1.2 || ^6.0.0",
"@vueuse/core": "^12.5.0 || ^14.0.0",
"@vueuse/integrations": "^12.5.0 || ^14.0.0",
"focus-trap": "^7.0.0 || ^8.0.0",
"chroma-js": "^3.1.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
"lucide-vue-next": ">=0.453.0",
"@internationalized/date": "^3.0.0",
"parse-duration": "^2.0.1",
"radix-vue": "^1.9.0",
"reka-ui": "^2.2.0",
"tailwind-merge": "^2.5.2",
"tailwindcss": "^3.1.0",

View File

@@ -17,7 +17,27 @@ export default defineConfig({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue', 'lucide-vue-next'],
external: [
'vue',
'lucide-vue-next',
'@floating-ui/vue',
'@heroicons/vue',
/^@heroicons\/vue\/.*/,
'@vueuse/core',
'@vueuse/integrations',
/^@vueuse\/integrations\/.*/,
'focus-trap',
'chroma-js',
'class-variance-authority',
'clsx',
'dayjs',
/^dayjs\/.*/,
'parse-duration',
'@internationalized/date',
'radix-vue',
'reka-ui',
'tailwind-merge',
],
output: {
// Provide global variables to use in the UMD build
// for externalized deps