a homebrewed DnD campaign based in the Honkai: Star Rail universe
hsr honkaistarrail dnd

dev: speedup build process for @starlight/icons + fix styles (#95)

authored by samanthanguyen.me and committed by

GitHub d7d560b6 3b41caff

+26 -7
+1
app/src/app.css
··· 1 1 @import 'tailwindcss'; 2 + @source './../../node_modules/@starlight/icons'; 2 3 3 4 @theme { 4 5 --color-hsr-gold: #9f7755;
+3 -1
package-lock.json
··· 9191 9191 "name": "@starlight/icons", 9192 9192 "version": "0.0.1", 9193 9193 "dependencies": { 9194 - "@starlight/types": "file:../types" 9194 + "@starlight/types": "file:../types", 9195 + "tailwindcss": "^4.1.18" 9195 9196 }, 9196 9197 "devDependencies": { 9197 9198 "@sveltejs/adapter-auto": "^7.0.0", 9198 9199 "@sveltejs/kit": "^2.49.2", 9199 9200 "@sveltejs/package": "^2.5.4", 9200 9201 "@sveltejs/vite-plugin-svelte": "^6.2.1", 9202 + "@tailwindcss/vite": "^4.1.18", 9201 9203 "svelte": "^5.45.10", 9202 9204 "svelte-check": "^4.3.3" 9203 9205 },
+14 -1
packages/icons/.storybook/main.ts
··· 1 1 import type { StorybookConfig } from '@storybook/sveltekit' 2 + import type { UserConfig } from 'vite' 2 3 3 4 const config: StorybookConfig = { 4 - stories: ['../src/**/*.stories.svelte'], 5 + stories: ['../stories/*.stories.svelte'], 5 6 staticDirs: ['../static'], 6 7 addons: [ 7 8 '@storybook/addon-docs', ··· 13 14 framework: { 14 15 name: '@storybook/sveltekit', 15 16 options: {}, 17 + }, 18 + async viteFinal(config) { 19 + // Merge custom configuration into the default config 20 + const { mergeConfig } = await import('vite') 21 + 22 + return mergeConfig(config, { 23 + server: { 24 + fs: { 25 + strict: false, 26 + }, 27 + }, 28 + } satisfies UserConfig) 16 29 }, 17 30 } 18 31
+2
packages/icons/package.json
··· 50 50 "@sveltejs/kit": "^2.49.2", 51 51 "@sveltejs/package": "^2.5.4", 52 52 "@sveltejs/vite-plugin-svelte": "^6.2.1", 53 + "tailwindcss": "^4.1.18", 54 + "@tailwindcss/vite": "^4.1.18", 53 55 "svelte": "^5.45.10", 54 56 "svelte-check": "^4.3.3" 55 57 },
+1 -1
packages/icons/src/lib/ElementIcon.stories.svelte packages/icons/stories/ElementIcon.stories.svelte
··· 1 1 <script module> 2 2 import { defineMeta } from '@storybook/addon-svelte-csf' 3 3 import { typeAs } from '@starlight/storybook-utils' 4 - import ElementIcon from './ElementIcon.svelte' 4 + import ElementIcon from './../src/lib/ElementIcon.svelte' 5 5 6 6 const { Story } = defineMeta({ 7 7 component: ElementIcon,
+1 -1
packages/icons/src/lib/MechanicIcon.stories.svelte packages/icons/stories/MechanicIcon.stories.svelte
··· 1 1 <script module> 2 2 import { typeAs } from '@starlight/storybook-utils' 3 3 import { defineMeta } from '@storybook/addon-svelte-csf' 4 - import MechanicIcon from './MechanicIcon.svelte' 4 + import MechanicIcon from './../src/lib/MechanicIcon.svelte' 5 5 6 6 const { Story } = defineMeta({ 7 7 component: MechanicIcon,
+1 -1
packages/icons/src/lib/UniverseIcon.stories.svelte packages/icons/stories/UniverseIcon.stories.svelte
··· 1 1 <script module> 2 2 import { defineMeta } from '@storybook/addon-svelte-csf' 3 - import UniverseIcon from './UniverseIcon.svelte' 3 + import UniverseIcon from './../src/lib/UniverseIcon.svelte' 4 4 5 5 const { Story } = defineMeta({ 6 6 component: UniverseIcon,
+1 -1
packages/icons/src/lib/WhirlIcon.stories.svelte packages/icons/stories/WhirlIcon.stories.svelte
··· 1 1 <script module> 2 2 import { defineMeta } from '@storybook/addon-svelte-csf' 3 - import WhirlIcon from './WhirlIcon.svelte' 3 + import WhirlIcon from './../src/lib/WhirlIcon.svelte' 4 4 5 5 const { Story } = defineMeta({ 6 6 component: WhirlIcon,
+2 -1
packages/icons/vite.config.ts
··· 1 1 import { sveltekit } from '@sveltejs/kit/vite' 2 + import tailwindcss from '@tailwindcss/vite' 2 3 import { defineProject } from 'vitest/config' 3 4 4 5 export default defineProject({ 5 - plugins: [sveltekit()], 6 + plugins: [sveltekit(), tailwindcss()], 6 7 })