ARKlight logoARKlight
Getting startedTutorialReferenceExamplesWhyChangelog

Compiler notes

Styling model
Preprocessing
Sourcemaps and debugging
Custom elements
Build tooling

Sourcemaps and debugging

Five more short essays, part 3 of 5.

reference/svelte-v2.16.1/test/sourcemaps

fixtures exist because Svelte's compiler genuinely transforms your source into different generated code, line by line -- a sourcemap is what lets a browser devtools panel point back at the

.svelte

file instead of the generated JS it's actually running.

ARKlight never generates code from a transformed intermediate form the way a

.svelte

file is rewritten.

arklight build --verbose

prints each pipeline stage, and

--debug

adds the full Python traceback on failure -- a trace through the compiler's own source, not a map back into a different source language.

Concern

Svelte v2

ARKlight

What the compiler emits

Generated JS, often with a sourcemap back to .svelte

Static HTML/CSS plus one fixed arklight.js runtime

Debugging a build failure

Devtools via the sourcemap, or the bundler's own errors

--debug for the full Python traceback; --narrate for prose via Rei

What the trace points at

Your component source, through the map

The compiler's own source, since nothing of yours survives transformed

A real example: this patch tried wiring a markdown-authoring companion project into this site using a

# include <markdown.ARKlight>

directive its own README describes. Building it against the ARKlight version installed for this patch fails at the preamble-resolution stage with a plain, specific message naming the two directive forms that do exist -- no sourcemap needed to find the problem. See

markdown authoring

for the full story.

This is also why ARKlight ships

sbom.txt

with every build: not a sourcemap, but a manifest of what actually went into the output, for a different kind of after-the-fact accounting -- more in

build tooling

.

See

the CLI

for the exact flags, and

gotchas

for the error table most

--debug

sessions end up confirming.

Styling model

No component-scoped stylesheet pass, because no component boundary survives into the output.

Open

Preprocessing

No pipeline stage for a second authoring language, because the entry file is already plain Python.

Open

Custom elements

No compile target for exporting a component as a reusable element outside its own build.

Open

Build tooling

One CLI invocation instead of a bundler configuration, with sbom.txt standing in for build stats.

Open
LicenseChangelogGitHubPyPI

ARKlight is GPLv3 with attribution terms; sites you build are yours. Your browser is still running JavaScript. We just made Python responsible for getting it there.