Closed NoisyMonk closed 11 months ago
This is a duplicate of #16. It's not currently supported, but it's on the roadmap for when I have time to get to it. Always happy to review a PR in the meantime though. 😄
For anyone else who runs across this, add this resolve
config to your vite config:
resolve: {
alias: {
'node:fs/promises': 'node-stdlib-browser/mock/empty',
}
},
(Omit node:
if you don't have imports using that protocol) That points the fs/promises
import at the same mock that node-stdlib-browser uses for fs
.
vite: 4.4.0 vite-plugin-node-polyfills: 0.9.0
I stumbled across this Plugin while trying to solve a "Failed to resolve entry for package "fs"" error and this looks promising. However while this Plugin does fix that first error, I then get the following error. Am I doing something wrong, or is this use case not covered?