Skip to content

Support publishing multiple components in a single package #66

@dgp1130

Description

@dgp1130

Currently, link_prerender_component() only supports a single component in an NPM package. This is good enough for the moment, but some use cases might benefit from multiple components packaged and versioned in the same NPM package. I'm not entirely sure how this would work since link_prerender_component() needs to know which component it is linking from the given NPM package, and if multiple are extracted, multiple link_prerender_component() targets need to coexist.

I'm also not sure how imports would work for a single package with multiple components. I think they would need to be separate subpaths of the package at minimum to avoid conflicts. Also splitting a single package into multiple components sounds a lot like the original rules_prerender design which included both the core runtime and the declarative shadow DOM component. We had to move away from that because putting both responsibilities into a single package put them into direct conflict with each other. I wonder if putting multiple components in a single package might be making a similar mistake? I'll need to think on it more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions