Body:
Description
deno task build:ssg (Phase 3 of the build pipeline) crashes immediately with a Vite SSR module evaluation error. The entire SSG build pipeline is unusable.
Steps to Reproduce
- Run
deno task build (Phase 1+2 completes successfully)
- Run
deno task build:ssg (Phase 3)
Error Output
[LessJS] Lit SSR adapter installed - TemplateResult to string
[vite] (ssr) Error when evaluating SSR module .less/.less-ssg-entry.ts: Invalid or unexpected token
at new AsyncFunction (<anonymous>)
at ESModulesEvaluator.runInlinedModule
at SSRCompatModuleRunner.directRequest
Root Cause
The generated .less-ssg-entry.ts file contains:
- An
__ssr() helper function using template literals (backtick strings) like `<${tag}></${tag}>`
- A massive ~7KB
headExtras CSS string (JSON.stringify'd double-quoted) inlined into every route handler's wrapInDocument() call
When Vite SSR's AsyncFunction evaluator processes this mixed content (template literals + huge inline strings), it fails with "Invalid or unexpected token".
Environment
- Deno 2.x + Vite 8.0.10 + @lessjs/core@0.9.2
- Windows 11
- Project uses
resolveAlias pointing to local src-tmp/packages/ sources
Severity
P0 — The entire SSG build pipeline is completely broken. No static HTML output can be generated.
Body:
Description
deno task build:ssg(Phase 3 of the build pipeline) crashes immediately with a Vite SSR module evaluation error. The entire SSG build pipeline is unusable.Steps to Reproduce
deno task build(Phase 1+2 completes successfully)deno task build:ssg(Phase 3)Error Output
Root Cause
The generated
.less-ssg-entry.tsfile contains:__ssr()helper function using template literals (backtick strings) like`<${tag}></${tag}>`headExtrasCSS string (JSON.stringify'd double-quoted) inlined into every route handler'swrapInDocument()callWhen Vite SSR's
AsyncFunctionevaluator processes this mixed content (template literals + huge inline strings), it fails with "Invalid or unexpected token".Environment
resolveAliaspointing to localsrc-tmp/packages/sourcesSeverity
P0 — The entire SSG build pipeline is completely broken. No static HTML output can be generated.