You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @davidmyersdev ,
As per my understanding this plugin actually helps make the vite react applications for externalizing the dependencies.
My application is using jsPDF library, which is using fs library and importing as require('fs'). but vite is giving 'require is not a function'.
So I tried to use vite-plugin-externalize-deps to make fs module externalize as below in vite.config.mjs file
but it is not working. pls help me on this.
added as dev dependency
below is the content of vite.config.mjs
import { externalizeDeps } from 'vite-plugin-externalize-deps'
Summary
Hi @davidmyersdev ,
As per my understanding this plugin actually helps make the vite react applications for externalizing the dependencies.
My application is using jsPDF library, which is using fs library and importing as require('fs'). but vite is giving 'require is not a function'.
So I tried to use vite-plugin-externalize-deps to make fs module externalize as below in vite.config.mjs file
but it is not working. pls help me on this.
import { externalizeDeps } from 'vite-plugin-externalize-deps'
plugins: [react(),
externalizeDeps({
include: [
'fs'
],})
Please let me know if I am doing anything wrong.
I also tried node polyfils and other things but nothing working. Please help me.
The text was updated successfully, but these errors were encountered: