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

svelte/internal import guard #861

Open
dominikg opened this issue Feb 21, 2024 · 0 comments
Open

svelte/internal import guard #861

dominikg opened this issue Feb 21, 2024 · 0 comments
Labels
enhancement New feature or request triage Awaiting triage by a project member

Comments

@dominikg
Copy link
Member

Describe the problem

access to svelte/internal should be limited to blessed code (mostly compiler output).
But for technical reasons it is exported from the svelte package and can be imported by anyone, and a lot of code does: https://github.com/search?q=%22svelte%2Finternal%22+&type=code

Describe the proposed solution

add a guard in resolveId that logs a warning or throws an error upon encountering such an import.

Alternatives considered

maybe eslint-plugin-svelte would also be able to flag these

Importance

nice to have

@dominikg dominikg added enhancement New feature or request triage Awaiting triage by a project member labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Awaiting triage by a project member
Projects
None yet
Development

No branches or pull requests

1 participant