Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/unplugin/src/bun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function bunTypiaPlugin(bunOptions?: BunOptions): BunPlugin {
build.onLoad({ filter }, async (args) => {
const id = wrap<ID>(args.path);

const source = wrap<Source>(await Bun.file(id).text());
const source = wrap<Source>((await import(`${args.path}?`, { with: { type: 'text' } })).default);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can you make a test function about this one?

@ryoppippi How do you think about this edition?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@samchon How would you like to make it? Do you want a function to compare the output of both Bun.file() and import()?

Copy link
Copy Markdown
Owner

@samchon samchon May 4, 2026

Choose a reason for hiding this comment

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

As I am not using, I don't know which way is proper.

But as you are saying it worked properly, it seems no problem. I will publish 12.1.1 tomorrow if the unplugin test passed.


const code = await taggedTransform(id, source, unpluginRaw);

Expand Down
Loading