Skip to content

fix(unstable): support importing files in npm packages as bytes and text #30065

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

Merged
merged 2 commits into from
Jul 10, 2025

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jul 10, 2025

import style from "package/styles.css" with { type: "text" };

Closes #29966

@dsherret dsherret changed the title fix(unstable): support using bytes and text imports into npm packages fix(unstable): support importing files in npm packages as bytes and text Jul 10, 2025
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, very cool

},
"compile": {
"steps": [{
"args": "compile --unstable-raw-imports --output bin main.ts",
Copy link
Member

Choose a reason for hiding this comment

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

Not super important - but this flag is not needed because there's deno.json, right? To test that the flag has effect you'd have to use --no-config, I think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, yeah I just accidentally did this. I'm too lazy to do another ci run to fix it now 😄

@dsherret dsherret merged commit cf44158 into denoland:main Jul 10, 2025
18 checks passed
@dsherret dsherret deleted the fix_bytes_text_npm_packages branch July 10, 2025 19:06
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.

type: 'text' import from npm package attempts to parse file as TS/JS
2 participants