SVELTE
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Svelte Preview.
At a glance
| Purpose | A Svelte component: markup, a script block and a style block in one file. |
| Extensions | .svelte |
| Poka parser | poka-svelte |
| Viewer | poka-text-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-svelte/src/main.rs (184 lines), plugin.json and poka-viewers' poka-text-viewer (plain text; it ignores the language hint). No unit tests or tests/samples.rs, and the corpus has no .svelte sample. Covers .svelte. The whole source is shown as text, under a summary line counting <script> blocks (and context="module"), <style> blocks with their lang, and {#if}, {#each}, {#await} and {#key} blocks. Judgement: B2, because the full text is shown; the gaps are presentation, limits and the heuristic summary.
What Poka does not read
- Shown as plain text without syntax highlighting
- The component is not rendered, and script, markup and style are not parsed into separate views
- The text shown stops at 200,000 characters and files over 16 MiB are cut (both flagged)
- Text that is not UTF-8 is decoded with replacement characters
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- svelte-syntax (candidate; MIT; Rust; https://docs.rs/svelte-syntax) — Parses Svelte components into typed AST and CST without compiling; v0.1.5. Repository: github.com/themixednuts/svelte.
- svelte (svelte/compiler parse) (candidate; MIT; JavaScript; https://github.com/sveltejs/svelte) — Official compiler; its parse() returns the component AST per svelte.dev docs (seen in search results). Repo page did not name the language.
Sources
- parsers/poka-svelte/src/main.rs
- parsers/poka-svelte/plugin.json