Status: ACCEPTED Date: 2026-05-24 Applies to: v0.21.9 Extends: ADR-0033, ADR-0037, ADR-0038
LessJS v0.21.x is a Deno workspace published to JSR and consumed by generated
applications through deno run -A jsr:@lessjs/create. The intended architecture
is standards-first ESM:
- LessJS packages expose TypeScript ESM entrypoints through JSR exports.
- Application source imports stable bare specifiers such as
@lessjs/core,@lessjs/ui/less-card, and@lessjs/signals/framework. - Vite/Rolldown performs the final production bundle, tree-shaking, and code splitting.
Recent JSR consumer smoke tests exposed a boundary leak. The adapter-vite SSG pipeline fetched JSR source files into virtual modules, then handed those modules to Vite. Source that was valid under Deno/JSR package resolution could still contain metadata-resolved specifiers such as:
jsr:@lessjs/signals@^0.21/framework
Vite/Rolldown does not natively own Deno's jsr: package scheme. When the SSG
pipeline bypasses Deno's resolver and fetches source manually, LessJS must not
leave Deno/JSR resolution semantics half-applied inside the Vite module graph.
LessJS v0.21.9 will treat the ESM module graph as the primary contract for published package consumption. Vite/Rolldown remains the final bundler only.
This means:
- Userland and generated app code import LessJS through stable ESM bare specifiers.
- Package
exportsdefine the public entrypoint graph. - Package
importsmay point atjsr:for Deno/JSR resolution, butjsr:specifiers must not leak into any Vite/Rolldown bundle graph. - adapter-vite must provide a centralized LessJS package graph bridge for SSG when it consumes published JSR source outside Deno's native resolver.
- The bridge must be package-aware, export-aware, version-aware, and tested against a generated consumer project.
Generated app source
imports @lessjs/app, @lessjs/core, @lessjs/ui/*
|
v
Deno / JSR package resolution
resolves package exports and imports
|
v
LessJS ESM module graph
stable bare specifiers and virtual ids only
|
v
adapter-vite SSG package graph bridge
normalizes LessJS package entrypoints for Vite
|
v
Vite / Rolldown
bundle, tree-shake, split chunks
Vite is not responsible for understanding Deno-specific package schemes. LessJS is responsible for ensuring the module graph handed to Vite is ordinary bundler-consumable ESM.
- Published LessJS package versions are unified for a release train.
- Public package entrypoints are declared through
exports. - Internal monorepo dependencies use stable LessJS bare specifiers in source.
jsr:@lessjs/*may appear in Deno package metadata, but not in generated Vite virtual entries or unresolved Vite/Rolldown logs.- adapter-vite SSG resolution must not be a list of one-off special cases.
- Consumer smoke tests must exercise the JSR-published path, not only the local workspace path.
- Do not replace Vite/Rolldown.
- Do not introduce a custom general-purpose bundler.
- Do not force application authors to import
jsr:specifiers in app source. - Do not add npm publishing as a workaround for the v0.21.x consumer path.
- Do not widen v0.21.9 into Edge Full-Stack runtime work.
- The generated app path matches the product story: ESM first, standards first, Vite final bundling.
- JSR package consumption becomes a release gate instead of an after-publish surprise.
- The SSG pipeline gets a single ownership boundary for package graph normalization.
- Future packages such as content, i18n, UI, and adapters can be checked against the same graph rules.
- adapter-vite must own more package-resolution logic than a purely local workspace build needs.
- Release validation now needs an external-style consumer smoke test.
- Version drift across packages becomes a blocking release issue.
v0.21.9 is accepted only when:
- all
packages/*/deno.jsonLessJS dependency imports are version-aligned; - a generated JSR consumer app builds from outside the workspace;
- Vite/Rolldown receives no unresolved
jsr:@lessjs/*specifier; - the SSG package graph bridge is centralized and tested;
- release docs record the exact consumer validation command.
- ADR-0033: Architecture Positioning: SSG Islands
- ADR-0037: DSD-First Strategic Boundary
- ADR-0038: ISR + Edge KV Architecture
docs/sop/v0.21.x/SOP-011-jsr-consumer-esm-graph.md