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

Remove outdated js snippet caveat on imports #3773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crajcan
Copy link

@crajcan crajcan commented Jan 10, 2024

I'm not sure if import statements are universally implemented now but myself and others seem to be having success using them in snippets.

@daxpedda
Copy link
Collaborator

daxpedda commented Jan 11, 2024

I honestly don't know anything about this limitation.
Going through git blame didn't help either.

@Liamolucko do you know something about the historical context here? Testing it out locally seems to work fine for me.

@Liamolucko
Copy link
Collaborator

@Liamolucko do you know something about the historical context here? Testing it out locally seems to work fine for me.

No, but I found the original RFC for snippets and there's a note about it there. It looks like what the caveat's supposed to mean is that imports don't work relative to the original path of the snippet like you'd expect, but there's nothing stopping you from writing them anyway and having them be resolved relative to the final path of the snippet. The fact that that works seems to be an unintended side effect of not processing the JS at all.

@daxpedda
Copy link
Collaborator

Thank you!
@crajcan at best I would update the documentation then instead of removing it.

@daxpedda daxpedda added the waiting for author Waiting for author to respond label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Waiting for author to respond
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants