-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
ESM importing CommonJS edge case (breaks vite
with vite-plugin-monaco-editor
)
#3881
Comments
Hi, same issue here! |
could you also provide package.json? |
@TiranexDev Here's mine if that can help {
"name": "@project/web",
"version": "0.0.0",
"description": "",
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"typecheck": "tsc --noEmit"
},
"license": "MIT",
"devDependencies": {
"solid-devtools": "~0.27.6",
"typescript": "~5.1.6",
"vite": "~4.3.9",
"vite-plugin-solid": "~2.7.0"
},
"dependencies": {
"@project/internal": "workspace:*",
"solid-js": "~1.7.8"
}
} Funny thing is that on my machine (Darwin 22.6.0 arm64 arm) it works. Inside the container, it doesn't |
How did you install bun in container? |
Have you tried running |
replacing |
Upd:
Upd2: it start work after execute |
i think this is an easy issue. for those looking to contribute, look in Module.ts or ImportMetaObject.ts and see how we handle |
vite
with vite-plugin-monaco-editor
)
can you suggest any workaround? |
Seems this issue is still happening. It every so often, when vite performs a hot reload, it crashes with As a side effect, it messes up the terminal: user input is no longer visible. |
This issue is stale and may be closed due to inactivity. If you're still running into this, please leave a comment. |
Wait for #9267 |
why was this given the needs repro label? i literally have a repro and explainer given. the issue with this change is it's a breaking change. |
What version of Bun is running?
0.7.1
What platform is your computer?
Darwin 22.5.0 x86_64 i386
What steps can reproduce the bug?
% bun --bun vite dev
What is the expected behavior?
No response
What do you see instead?
Additional information
vite.config.ts:
The text was updated successfully, but these errors were encountered: