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

Bun watch/hot doesn't work #361

Open
3 tasks done
Shay12tg opened this issue Jan 20, 2025 · 4 comments
Open
3 tasks done

Bun watch/hot doesn't work #361

Shay12tg opened this issue Jan 20, 2025 · 4 comments

Comments

@Shay12tg
Copy link

Shay12tg commented Jan 20, 2025

unplugin-typia version

1.2.0

What platform is your computer? Copy the output of npx envinfo --system -npmPackages cleye --binaries

System:
OS: macOS 15.1.1
CPU: (11) arm64 Apple M3 Pro
Memory: 1.52 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.13.1 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - /opt/homebrew/bin/npm
pnpm: 9.15.2 - /opt/homebrew/bin/pnpm
bun: 1.2.0 - /opt/homebrew/bin/bun

Describe the bug

`# bunfig.toml
preload = ["./preload.ts"]

[test]
preload = ["./preload.ts"]
coverageSkipTestFiles = true
coverage = true
`

`// preload.ts
import {plugin} from 'bun';
import UnpluginTypia from '@ryoppippi/unplugin-typia/bun';

plugin(UnpluginTypia({log: false, cache: false}));
`

after adding this to my project, watch/hot features stopped working.

Reproduction

bun --watch index.ts
bun --hot index.ts

Validations

@ryoppippi
Copy link
Owner

We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.

@ryoppippi ryoppippi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2025
@Shay12tg
Copy link
Author

Shay12tg commented Jan 25, 2025

@ryoppippi except from the platform data, which i now updated, its reproducible... i have made a simple ts project, and added the two files, bunfig and preload to the directory, and it fails...

I'll make it easier for you to reproduce, it only takes :

bunfig.toml

# if you uncomment next line, watch feature works...
preload = ["./preload.ts"]

index.ts

console.log('hi')

package.json

{
  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "bun --watch index.ts"
  },
  "dependencies": {
    "@ryoppippi/unplugin-typia": "^1.2.0",
    "typescript": "^5.7.3",
    "typia": "^7.6.0"
  }
}

preload.ts

import {plugin} from 'bun';
import UnpluginTypia from '@ryoppippi/unplugin-typia/bun';

plugin(UnpluginTypia({log: false, cache: false}));

it only takes one command:
bun run test
try to modify index.ts and it won't work, comment out the preload (disable the plugin) and it works

@ryoppippi ryoppippi reopened this Jan 25, 2025
@ryoppippi
Copy link
Owner

@Shay12tg create reproducible repository to make my life easier

@Shay12tg
Copy link
Author

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

No branches or pull requests

2 participants