Standardize settings file naming and relocate documentation files Fix code quality violations from rsx:check Reorganize user_management directory into logical subdirectories Move Quill Bundle to core and align with Tom Select pattern Simplify Site Settings page to focus on core site information Complete Phase 5: Multi-tenant authentication with login flow and site selection Add route query parameter rule and synchronize filename validation logic Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs Implement filename convention rule and resolve VS Code auto-rename conflict Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns Implement RPC server architecture for JavaScript parsing WIP: Add RPC server infrastructure for JS parsing (partial implementation) Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation Add JQHTML-CLASS-01 rule and fix redundant class names Improve code quality rules and resolve violations Remove legacy fatal error format in favor of unified 'fatal' error type Filter internal keys from window.rsxapp output Update button styling and comprehensive form/modal documentation Add conditional fly-in animation for modals Fix non-deterministic bundle compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.7 KiB
JavaScript
46 lines
1.7 KiB
JavaScript
/**
|
|
* JQHTML Webpack Loader
|
|
*
|
|
* Enables importing .jqhtml files in webpack projects:
|
|
*
|
|
* import UserCard from './UserCard.jqhtml';
|
|
*
|
|
* The loader:
|
|
* 1. Uses unified compiler from @jqhtml/parser
|
|
* 2. Generates ES module code that exports components
|
|
* 3. Supports source maps for debugging
|
|
*/
|
|
import { compileTemplate } from '@jqhtml/parser';
|
|
export default function jqhtmlLoader(source) {
|
|
console.log(`[JQHTML Loader] Started processing: ${this.resourcePath}`);
|
|
const callback = this.async();
|
|
if (!callback) {
|
|
throw new Error('JQHTML loader requires async mode');
|
|
}
|
|
try {
|
|
// Use unified compiler
|
|
console.log(`[JQHTML Loader] Compiling ${this.resourcePath}...`);
|
|
const compiled = compileTemplate(source, this.resourcePath, {
|
|
format: 'esm',
|
|
sourcemap: this.sourceMap,
|
|
version: undefined // Will use package.json version automatically
|
|
});
|
|
const { code, componentName } = compiled;
|
|
console.log(`[JQHTML Loader] Compiled component: ${componentName}`);
|
|
// For webpack loader, we use the ESM format directly from compiler
|
|
const moduleCode = code;
|
|
// Return the generated code (sourcemap is inline if enabled)
|
|
console.log(`[JQHTML Loader] Finished processing ${this.resourcePath}`);
|
|
callback(null, moduleCode);
|
|
}
|
|
catch (error) {
|
|
// Enhanced error reporting with file context
|
|
if (error instanceof Error) {
|
|
error.message = `JQHTML compilation failed in ${this.resourcePath}:\n${error.message}`;
|
|
}
|
|
callback(error);
|
|
}
|
|
}
|
|
// Webpack loader interface
|
|
export const raw = false; // Process source as UTF-8 string
|
|
//# sourceMappingURL=index.js.map
|