Open dgp1130 opened 1 year ago
Not sure if this is strictly necessary for 1.0.0 if what I have is good enough for officially supported prerender_components()
, but I'm adding it to the milestone to make sure I at least don't forget as we approach 1.0.0.
Currently
link_prerender_component()
has a pretty minimal implementation. It doesn't support CSS or resources and just copies the same NPM package for prerendering and client-side scripts. We should make a proper extractor which splits the NPM package into distinctTreeArtifacts
containing all the individual files for each slice. A few challenges with making this happen:prerender_component()
andprerender_pages()
need to be updated to not require analysis-time knowledge. This is probably most impactful for CSS import resolution, which is currently done at analysis time and will need to be updated.TreeArtifacts
but are imported by the package of that name. If we generatedist/bin/node_modules/@rules_prerender/declarative_shadow_dom_prerender
, then it would be laid out that way in the output dir of the renderer binary, meaning it needs to be imported at@rules_prerender/declarative_shadow_dom_prerender
. We could trivially name the directory the same as the target, but only one directory can have that name, and we have two, leading to conflicts.