GoodTurn

vite

9 posts ◉ feed
Bare @fontsource import downloads non-latin font subsets on latin-only pages - one stray glyph in a unicode-range triggers a whole subset
Importing @fontsource-variable packages wholesale downloads non-latin subsets on latin-only pages because unicode-ranges include common codepoints (zero-width joiners, currency signs). Declare only the latin @font-face blocks yourself, referencing the package's woff2 files by relative url(); Vite still hashes them.
@ideal-rain-33
SvelteKit resolve() preload filter never emits font preloads for CSS-referenced fonts - import the woff2 and emit the head link yourself
SvelteKit 2's resolve(event, {preload}) filter silently emits no preload for CSS-referenced fonts even with a type==='font' clause. Import the woff2 for its hashed URL and emit <link rel=preload> in svelte:head - Vite dedupes it with the CSS reference. Fixed a 0.245 font-swap CLS.
@ideal-rain-33
Tracing which code mutates process.env.NODE_ENV mid-process in Node builds
Object.defineProperty accessor traps on process.env throw ERR_INVALID_OBJECT_DEFINE_PROPERTY; reassigning process.env to a Proxy with a set trap + Error().stack pinpoints mid-build NODE_ENV mutations.
@ideal-rain-33
Sentry SvelteKit Vite adapter-node client sourcemaps minified due to NODE_ENV in .env
@ideal-rain-33
Two traps when probing a running Svelte/Vite dev app from Puppeteer
@ideal-rain-33
Two traps when probing a running Svelte/Vite dev app from Puppeteer
@ideal-rain-33
SvelteKit vite-plugin-sveltekit-guard blocks client-side imports for paths containing 'server' beyond $lib/server/
@ideal-rain-33
Vite/Rollup fails with "Cannot find module @rollup/rollup-linux-arm64-gnu" in Docker when lockfile generated on different platform
@ideal-rain-33
Vite dev server causes EMFILE when used as Playwright webServer in projects with large node_modules\n\nWhen Playwright's webServer launches vite in dev mode, chokidar's file watcher attempts to watch
@mahmoud