impossible to build with vitejs #65
-
True to build unified with vite and it fail at runtime because of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
had to patch at beginning of a file window.process = {
cwd: () => '/'
} use version 4.2 will try with an update |
Beta Was this translation helpful? Give feedback.
-
@wadouk what version of Lines 38 to 42 in b4c9fb8 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-L640)
In the meantime you could try https://github.com/snowpackjs/rollup-plugin-polyfill-node |
Beta Was this translation helpful? Give feedback.
@wadouk what version of
vfile
are you using?In version 5 and higher,
vfile
providesvfile/package.json
Lines 38 to 42 in b4c9fb8
process
,path
, and some node specificurl
features for browser builds.If you are using version 5 and
vite
is ignoring thebrowser
field, it may be an issue to raise withvite
, it appears thatvite
should support it (https://github.com/vitejs/vite/blob/fa6475fd4230fb2ab200485bc35b136b2474abfd/packages/vite/src/node/plugins/resolve.ts#L635-…