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

config handling makes bun and nodemon crazy #17839

Closed
7 tasks done
slavaGanzin opened this issue Aug 8, 2024 · 2 comments
Closed
7 tasks done

config handling makes bun and nodemon crazy #17839

slavaGanzin opened this issue Aug 8, 2024 · 2 comments

Comments

@slavaGanzin
Copy link

Describe the bug

Hello, thanks for Vite!

if (isESM) {
const fileBase = `${fileName}.timestamp-${Date.now()}-${Math.random()
.toString(16)
.slice(2)}`
const fileNameTmp = `${fileBase}.mjs`
const fileUrl = `${pathToFileURL(fileBase)}.mjs`
await fsp.writeFile(fileNameTmp, bundledCode)
try {
return (await import(fileUrl)).default
} finally {
fs.unlink(fileNameTmp, () => {}) // Ignore errors
}
}

I don't know context, but it's a crazy hack that makes any --watch command go crazy. And you couldn't detect it, because it cover himself with deleting files. "Fortunately", I found out a lot of undeleted Vite.timestamp.mjs files, and I started digging.

Can this files at least be created outside repo?

Reproduction

none

Steps to reproduce

No response

System Info

doesn't matter

Used Package Manager

bun

Logs

No response

Validations

@slavaGanzin
Copy link
Author

Btw, my package already has {type: 'module'}, so creating .mjs files doesn't make any sense

@bluwy
Copy link
Member

bluwy commented Aug 8, 2024

This is being tracked at #9470

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants