Temporarily disable jqhtml caching + fix sourcemap paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-04 05:52:00 +00:00
parent 273ea90a84
commit 46f147e427
2 changed files with 11 additions and 3 deletions

View File

@@ -94,8 +94,13 @@ class Jqhtml_Integration {
//
// scope_key() changes when: app code changes, user logs out, site changes.
// This automatically invalidates cached component renders.
//
// TEMPORARILY DISABLED: jqhtml caching is temporarily disabled for a client
// demo while we figure out why it's not serializing Rsx_Js_Model classes
// correctly. We likely want to add a serialize and unserialize callback to
// jqhtml to help make the integration between jqhtml and rspade tighter.
// ─────────────────────────────────────────────────────────────────────
jqhtml.set_cache_key(Rsx.scope_key());
// jqhtml.set_cache_key(Rsx.scope_key());
window.jqhtml.debug.verbose = false;
}

View File

@@ -76,10 +76,13 @@ function compileFile(filePath, options = {}) {
}
const source = fs.readFileSync(inputPath, 'utf-8');
const filename = path.basename(inputPath);
// Use relative path for sourcemap sources (not just basename)
// This allows browser devtools to show proper file paths
const relativePath = path.relative(process.cwd(), inputPath);
// Compile using @jqhtml/parser API
const compiled = compileTemplate(source, filename, {
const compiled = compileTemplate(source, relativePath, {
format: options.format || 'iife',
sourcemap: options.sourcemap !== false,
version: VERSION