You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2021. It is now read-only.
Using case sensitive attribute names as markers in the generated by the Universal template will not work with the app shell runtime parser. Currently the runtime parser uses parse5 which serializes the HTML AST without keeping the case sensitivity.
Options to proceed:
Short term solution is using class name as a marker.
For longer term solution consider:
Using the Angular template parser for producing the AST.
Forking parse5 and introducing case sensitivity, ES2015 modules (allow easier tree-shaking), and payload reduction.
The text was updated successfully, but these errors were encountered:
Today I did some experiments with the Angular's TemplateParser. Everything seems to work well, even without existing in the schema attributes.
We do not have serializer for the produced AST so we can reuse the one from Parse5, which is not destructive in sense of case sensitivity (and is also quite minimalistic). In order to pass the produced by the TemplateParser AST to the Parse5 serializer we'd have to adapt it.
In recap, as optimal solution at this point I see:
Producing an AST with the Angular's TemplateParser.
Adapting the AST to fit the shape required by the serializer of parse5.
Serializing the AST with parse5.
We'll be able to tree-shake everything (even parse5 with this plugin), and maintain as less code as possible.
Based on the latest in-depth research I did, the best option right now is to slightly modify parse5's lexer runtime. This way we will enable case-sensitive parsing. I opened a PR with the case sensitive run-time parser here #68. Here are some brief notes that I did.
Using case sensitive attribute names as markers in the generated by the Universal template will not work with the app shell runtime parser. Currently the runtime parser uses parse5 which serializes the HTML AST without keeping the case sensitivity.
Options to proceed:
The text was updated successfully, but these errors were encountered: