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

frontends: support several extensions #176

Open
terrablue opened this issue Mar 14, 2025 · 0 comments
Open

frontends: support several extensions #176

terrablue opened this issue Mar 14, 2025 · 0 comments
Labels
modules modules / ecosystem

Comments

@terrablue
Copy link
Contributor

It might be desirable to support several extensions, as in @primate/react supporting both .jsx and .tsx, to allow for a transitional period from untyped to typed components, without being forced to change an entire application at once. This is in line with Primate's goal of having flexibility in moving from one technology to another.

Currently, frontend components accept an extension string config property with a sane default (.jsx for React, .svelte for Svelte, etc.). This will need to be changed to an array of extensions, as in [".jsx", ".tsx"], which is more complex to validate for errors.

We would also need to detect files with the same name but different extension, to potentially support extensionless imports like import Component from "#component/PostView" in the future.

Due to the low return:investment ratio, this will be low priority if and until enough interest in expressed.

@terrablue terrablue added the modules modules / ecosystem label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules modules / ecosystem
Projects
None yet
Development

No branches or pull requests

1 participant