Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support publishing multiple components in a single package #66

Open
dgp1130 opened this issue Feb 14, 2023 · 0 comments
Open

Support publishing multiple components in a single package #66

dgp1130 opened this issue Feb 14, 2023 · 0 comments
Labels
feature New feature or request

Comments

@dgp1130
Copy link
Owner

dgp1130 commented Feb 14, 2023

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.

@dgp1130 dgp1130 added the feature New feature or request label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant