Last 12 weeks · 21 commits
3 of 6 standards met
Describe the bug According to the docs: https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/inspector.md ... the Inspector plugin needs to be enabled in , but I have found that it simply does not work (alt+x hotkey does nothing in both Chrome and Firefox). Alternatively, if you enable it in , the Inspector will begin working normally. e.g. in : Please update that doc page to mention this code block for if users can't get it to work with , thank you. Reproduction URL N/A Reproduction _No response_ Logs System Info
Description — the dep-prebundling path for modules — handed raw dependency source straight to , so any TypeScript in a dependency's rune modules caused and died at prebundling. Its sibling, , already preprocesses before compiling. Fixes #1396. What changed now runs two steps before : 1. * — same branch has, passing the preprocessed code on. preprocessors receive the module source, mirroring how treats module sources. 2. Type stripping for * — in the normal transform pipeline, vite core strips TypeScript from modules before they reach , but prebundling intercepts the file before that can happen. The prebundle path now strips types itself via (same mechanism uses), keyed on the filename. Step 2 is what actually fixes the zero-config reproduction from the issue: preprocessors like 's type stripper never fire on tag-less module sources (there is no `export const x: number = 1.svelte.ts'preprocess'PREBUNDLE_SENSITIVE_OPTIONSModuleCompileOptionsviteScriptsrc/preprocess.jstarget: 'esnext'typescript: { onlyRemoveTypeImports: true }packages/vite-plugin-svelte/__tests__/setup-optimizer.spec.js.svelte.tscompileModule.svelte.tscompileModuleinterface.svelte.js` modules when no preprocess options are set (unchanged behavior) All 41 unit tests pass.
Repository: sveltejs/vite-plugin-svelte. Description: Svelte plugin for https://vite.dev Stars: 1041, Forks: 145. Primary language: JavaScript. Languages: JavaScript (56.1%), TypeScript (28.6%), Svelte (12.8%), HTML (2.5%), SCSS (0%). License: MIT. Topics: svelte, vite, vite-plugin. Latest release: @sveltejs/vite-plugin-svelte@7.3.1 (6d ago). Open PRs: 12, open issues: 20. Last activity: 11h ago. Community health: 62%. Top contributors: dominikg, renovate[bot], github-actions[bot], bluwy, benmccann, teemingc, Rich-Harris, rixo, maxlath, baseballyama and others.