Description:
To adhere to the framework's "zero builds" development principle, the parse5 library cannot be imported directly from node_modules at runtime. A build step is required to convert it into a browser-compatible ES module. This bundled file will be checked into the dist directory and imported by the HtmlTemplateProcessor.
Implementation Details:
- Tool:
esbuild
- Source:
node_modules/parse5/dist/index.js
- Output:
dist/parse5.mjs
- Script: Create a new build script
buildScripts/bundleParse5.mjs and an associated npm script bundle-parse5 to perform the bundling and minification.
- Outcome: The
HtmlTemplateProcessor will be updated to import ../../../dist/parse5.mjs.
Description: To adhere to the framework's "zero builds" development principle, the
parse5library cannot be imported directly fromnode_modulesat runtime. A build step is required to convert it into a browser-compatible ES module. This bundled file will be checked into thedistdirectory and imported by theHtmlTemplateProcessor.Implementation Details:
esbuildnode_modules/parse5/dist/index.jsdist/parse5.mjsbuildScripts/bundleParse5.mjsand an associated npm scriptbundle-parse5to perform the bundling and minification.HtmlTemplateProcessorwill be updated to import../../../dist/parse5.mjs.