# Technical
## A Vite config cannot import a workspace package's TypeScript source
**What happened.** `apps/rosea/vite.config.ts` imported the name constants from
`@rosea/schema`, whose `main` is `src/index.ts`. `vite build` failed with
`ERR_UNKNOWN_FILE_EXTENSION ".ts"`. `--configLoader runner` fixed the build. But
`svelte-check` loads the same config on its own, still failed, and printed
*failed to load config* while reporting 0 errors.
**Why it bit.** Vite bundles a config's relative imports but externalises anything
resolved through `node_modules`. Workspace packages are symlinks there, so Node
loads them natively, and Node 22.11 does not strip types. A tool that reads the config
for you has its own loader.
**How to apply it.** In a Vite config, import workspace code by **relative path**
to a dependency-free module. Treat a failure message inside a green run as a
failure: find which tool printed it.
## Vite escapes the quotes in an injected `` CSP
**What happened.** The built `index.html` carries `content="default-src 'self'…"`.
A regex over the raw HTML looking for `'self'` would never match it.
**Why it bit.** The HTML is valid and the browser decodes the entities. Only a test
that reads the bytes sees the difference.
**How to apply it.** Read attributes from the DOM:
`page.locator('meta[http-equiv=…]').getAttribute('content')`. Keep raw-HTML checks for
byte-level questions, such as whether there is an inline `