Skip to content

impossible to build with vitejs #65

Answered by ChristianMurphy
wadouk asked this question in Q&A
Discussion options

You must be logged in to vote

@wadouk what version of vfile are you using?
In version 5 and higher, vfile provides

vfile/package.json

Lines 38 to 42 in b4c9fb8

"browser": {
"./lib/minpath.js": "./lib/minpath.browser.js",
"./lib/minproc.js": "./lib/minproc.browser.js",
"./lib/minurl.js": "./lib/minurl.browser.js"
},
which removes the dependency on process, path, and some node specific url features for browser builds.
If you are using version 5 and vite is ignoring the browser field, it may be an issue to raise with vite, it appears that vite should support it (https://github.com/vitejs/vite/blob/fa6475fd4230fb2ab200485bc35b136b2474abfd/packages/vite/src/node/plugins/resolve.ts#L635-…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wadouk
Comment options

@ChristianMurphy
Comment options

Answer selected by wadouk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants