json-as-xlsx
json-as-xlsx copied to clipboard
Module externalized for browser compatibility warning when update to Vite ^5.0.11
Im building an Vue.js App and after update my vite version I start to receive this warning on console:
When going to vite Troubleshooting section they say:
When you use a Node.js module in the browser, Vite will output the following warning.
Module "fs" has been externalized for browser compatibility. Cannot access "fs.readFile" in client code.
This is because Vite does not automatically polyfill Node.js modules.
We recommend avoiding Node.js modules for browser code to reduce the bundle size, although you can add polyfills manually. If the module is imported from a third-party library (that's meant to be used in the browser), it's advised to report the issue to the respective library.
Any tip of how to avoid this warning? Thanks.
[EDIT] I've seen a similar issue opened on SheetJS a time ago: https://github.com/SheetJS/sheetjs/issues/2765
I encountered the same situation and did not find a solution
Looking at the code, I suspect that it's not this repo where the issue is but a dependency: "@e965/xlsx"