UNPKG

@kanton-basel-stadt/designsystem

Version:

Unplugin to install the digital design system of the canton of Basel-Stadt

26 lines (24 loc) 663 B
import type { UnpluginOptions } from 'unplugin' import { transformIdsInCode } from '../utils/transformIdsInCode' export function getTransformIdsUnplugin(): UnpluginOptions { return { name: '@kanton-basel-stadt/designsystem/transform-ids', enforce: 'pre', transform: transformIdsInCode, transformInclude(id) { return !id.endsWith('.woff') && !id.endsWith('.woff2') }, esbuild: { onLoadFilter: /\.(?!woff2?$)[^.]+$/i, }, vite: { config() { return { optimizeDeps: { exclude: ['@kanton-basel-stadt/designsystem/dist/configs/icons-index'], }, } }, }, } }