-
-
Notifications
You must be signed in to change notification settings - Fork 873
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
[vite]: Rollup failed to resolve import "#minpath" from "node_modules/vfile/lib/index.js". #864
Comments
a temporary fix, is patching the vfile package diff --git a/node_modules/vfile/lib/index.js b/node_modules/vfile/lib/index.js
index 68db7f9..84cebfd 100644
--- a/node_modules/vfile/lib/index.js
+++ b/node_modules/vfile/lib/index.js
@@ -9,9 +9,9 @@
*/
import {VFileMessage} from 'vfile-message'
-import {minpath} from '#minpath'
-import {minproc} from '#minproc'
-import {urlToPath, isUrl} from '#minurl'
+import {minpath} from './minpath.browser'
+import {minproc} from './minproc.browser'
+import {urlToPath, isUrl} from './minurl.browser'
/**
* Order of setting (least specific to most), we need this because otherwise you can use it with patch-package or whatever |
It's a bug in vite's export resolution. |
This comment has been minimized.
This comment has been minimized.
yes, I added it for the community in case someone will hit this issue and have no option to migrate vite |
and thanks for that. I'm running v3, and there's no way in hell i'm upgrading my bundler because of 3 lines of code on a dependency of a dependency 😂 |
Initial checklist
Affected packages and versions
react-markdown@9.0.1, vfile@6.x.x
Link to runnable example
scaffold a react app with vite
Steps to reproduce
Expected behavior
it should use the
minpath.browser
,minproc.browser
,minurl.browser
importsActual behavior
it fails to use correct imports
Affected runtime and version
node@v22.3.0, vite@3.x.x
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
Rollup
The text was updated successfully, but these errors were encountered: