1. Summary
Use the new reusable astTemplateProcessor to enable build-time html template transformation for the dist/development Webpack environment.
2. Rationale
To ensure feature parity and a consistent developer experience, html templates must be correctly processed in the dist/development environment. This allows developers who use this environment (e.g., for TypeScript or specific debugging scenarios) to use the template syntax.
3. Scope & Implementation Plan
- Create Webpack Loader: Create a custom Webpack loader (e.g.,
buildScripts/webpack/loader/template-loader.mjs).
- Implement Loader Logic:
- The loader will receive the file content.
- It will perform the same pre-emptive regex check from sub-task #7159 .
- If the check passes, it will import and call the
processFileContent() function from astTemplateProcessor.mjs.
- It will return the transformed code (or the original code if the check fails) to the Webpack compilation chain.
- Configure Webpack: Update the Webpack configuration for
dist/development to use this new loader for all .mjs files.
4. Definition of Done
- The custom Webpack loader is created and functional.
- The
dist/development build process correctly transforms html templates into VDOM objects.
- Applications running in
dist/development mode render components using html templates correctly.
1. Summary
Use the new reusable
astTemplateProcessorto enable build-timehtmltemplate transformation for thedist/developmentWebpack environment.2. Rationale
To ensure feature parity and a consistent developer experience,
htmltemplates must be correctly processed in thedist/developmentenvironment. This allows developers who use this environment (e.g., for TypeScript or specific debugging scenarios) to use the template syntax.3. Scope & Implementation Plan
buildScripts/webpack/loader/template-loader.mjs).processFileContent()function fromastTemplateProcessor.mjs.dist/developmentto use this new loader for all.mjsfiles.4. Definition of Done
dist/developmentbuild process correctly transformshtmltemplates into VDOM objects.dist/developmentmode render components usinghtmltemplates correctly.