🐛 Fixed hot reloading in Bun#1834
Open
iMrDJAi wants to merge 3 commits intosamchon:masterfrom
Open
Conversation
Author
|
@samchon Since you're actively working on the project right now, could you please take a look? |
samchon
requested changes
May 4, 2026
| @@ -1,5 +1,5 @@ | |||
| import type { FilterPattern } from "@rollup/pluginutils"; | |||
| import type { ITransformOptions } from "@typia/core"; | |||
| import type { ITransformOptions } from "../../../core/lib/context/ITransformOptions.js"; | |||
Author
| 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); |
Owner
There was a problem hiding this comment.
Can you make a test function about this one?
@ryoppippi How do you think about this edition?
Author
There was a problem hiding this comment.
@samchon How would you like to make it? Do you want a function to compare the output of both Bun.file() and import()?
Owner
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In this PR I have implemented the suggested workaround (oven-sh/bun#4689 (comment)) to restore HMR and file watching functionalities. Currently
--watch/--hotflags don't work for Bun setups that use plugins. I have tested and I confirm that this workaround does indeed fix the issue.I also rectified the
ITransformOptionsimport path in@typia/unpluginand restored type intellisense in plugin options.