1. Summary
Use the new reusable astTemplateProcessor to enable build-time html template transformation for the dist/production Webpack environment.
2. Rationale
This is the final step to ensure html templates are a fully supported, production-ready feature. The transformation must be applied to the dist/production build to gain the performance benefits of pre-compilation in the most optimized deployment environment.
3. Scope & Implementation Plan
- Reuse Webpack Loader: The same custom Webpack loader created for sub-task #26 can be used.
- Configure Webpack: Update the Webpack configuration for
dist/production to apply the template-loader.mjs to all .mjs files before they are passed to other loaders like Babel or Terser.
4. Definition of Done
- The
dist/production build process correctly transforms html templates into VDOM objects.
- The final, minified production bundles contain optimized VDOM, not raw
html template strings.
- Applications running in
dist/production mode render components using html templates correctly.
1. Summary
Use the new reusable
astTemplateProcessorto enable build-timehtmltemplate transformation for thedist/productionWebpack environment.2. Rationale
This is the final step to ensure
htmltemplates are a fully supported, production-ready feature. The transformation must be applied to thedist/productionbuild to gain the performance benefits of pre-compilation in the most optimized deployment environment.3. Scope & Implementation Plan
dist/productionto apply thetemplate-loader.mjsto all.mjsfiles before they are passed to other loaders like Babel or Terser.4. Definition of Done
dist/productionbuild process correctly transformshtmltemplates into VDOM objects.htmltemplate strings.dist/productionmode render components usinghtmltemplates correctly.