Skip to content

Commit

Permalink
revert(partial): resolve Storybook warnings and errors when running l…
Browse files Browse the repository at this point in the history
…ocally (#125)

This partially reverts commit
18d768d

RISDEV-0000
  • Loading branch information
hamo225 committed Feb 7, 2025
1 parent ebb769f commit 0608961
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion .storybook/preview-head.html

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eslint:fix": "npm run eslint:check -- --fix",
"audit:licenses": "license-checker --production --excludePrivatePackages --excludePackages @digitalservicebund/ris-ui@$(cat package.json | jq -r '.version') --onlyAllow \"$(. ./parse-allowed-licenses.sh)\" --csv --out ./frontend-license-report.csv",
"typecheck": "vue-tsc",
"sync-fonts": "mkdir -p public/fonts && rm -f public/fonts/*.woff public/fonts/*.woff2; cp ./node_modules/@digitalservice4germany/angie/fonts/* public/fonts/; cp ./node_modules/@digitalservice4germany/angie/fonts.css public/fonts.css; sed -i '' 's|./fonts/|/fonts/|g' public/fonts.css",
"sync-fonts": "rm ./public/fonts/*.woff ./public/fonts/*.woff2; cp ./node_modules/@digitalservice4germany/angie/fonts/* ./public/fonts/; cp ./node_modules/@digitalservice4germany/angie/fonts.css ./public/",
"test": "vitest run",
"test:watch": "vitest watch"
},
Expand Down
8 changes: 8 additions & 0 deletions public/fonts/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Fonts are provided by @digitalservicebund/angie. But we need to copy
them here rather than bundling them with the rest of the CSS since
Vite would otherwise base64-encode and inline them in the CSS. Because
we don't need all those fonts, the CSS would be unnecessarily big and
slow.

Also see:
https://github.com/vitejs/vite/issues/3295#issuecomment-1353409889

0 comments on commit 0608961

Please sign in to comment.