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

feat: handle data: imports (non-native only) #299

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

bohjak
Copy link
Contributor

@bohjak bohjak commented Sep 21, 2024

Resolves #207

Explicitly check for data: scheme and use native import to handle it.

@pi0 pi0 changed the title fix: handle data uri with native require feat: handle data: imports Sep 23, 2024
@bohjak
Copy link
Contributor Author

bohjak commented Sep 24, 2024

@pi0 I've added the data-uri fixture to the ignore lists for the native and bun tests. Breaks native, because it requires ESM. I haven't looked into how exactly bun imports work, but for some reason the require keyword works fine with data URLs, but import doesn't 🤷

@pi0 pi0 changed the title feat: handle data: imports feat: handle data: imports (non-native only) Sep 25, 2024
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 merged commit 68d5be0 into unjs:main Sep 25, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data-url modules fail to import
2 participants