- Delete packages/library/src/engine/ and engine.spec.ts; LoadingIcon is now exported directly instead of routed through a generic theming engine. - Remove primevue from every package.json (root devDependencies, library peerDependencies, playground dependencies) and from vite.config.ts's externalized/global Rollup config; add reka-ui as the library's peer dep. - Delete the hand-written nychthemeron.css/theme.css, now fully superseded by the Tailwind entry CSS; both library exports (./style, ./theme) point at it. - Drop the PrimeVue plugin install from Storybook's preview.ts. - Add a `@source "../../";` directive to tailwind.css: Tailwind's automatic content detection is scoped to whichever Vite project runs it, so when the playground consumes this CSS file it never scanned the sibling packages/library/src tree for class usage -- every component rendered with zero utility classes applied until this was added (verified via the compiled Storybook CSS output going from ~2KB/no .bg-primary rule to ~40KB with the full utility set, and the pre-fix screenshot that surfaced it: buttons and other components with a real background color showing as bare, near-invisible text on white). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
32 lines
856 B
TypeScript
32 lines
856 B
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import dts from 'vite-plugin-dts'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue(), tailwindcss(), dts({ tsconfigPath: './tsconfig.json', include: ['src/**/*'] })],
|
|
resolve: {
|
|
alias: {
|
|
'~': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: fileURLToPath(new URL('./src/index.ts', import.meta.url)),
|
|
name: 'NychthemeronLibrary',
|
|
formats: ['es'],
|
|
fileName: () => 'index.js',
|
|
},
|
|
rollupOptions: {
|
|
external: ['vue', 'reka-ui'],
|
|
output: {
|
|
globals: {
|
|
vue: 'Vue',
|
|
'reka-ui': 'RekaUI',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|