Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRA to Vite migration, process is not defined error in 'mime-types' package. #111

Open
dethrtrns opened this issue Aug 28, 2023 · 0 comments

Comments

@dethrtrns
Copy link

Hi there, I'm trying to migrate the project of my company where I work, from cra to Vite. Here's where I'm stuck:
Screenshot 2023-08-28 at 4 30 33 PM
Screenshot 2023-08-28 at 4 26 39 PM

I've checked out similar issues(all those issues have been marked as closed without any resolution) with other packages and all I got was a workaround of:
vitejs/vite#1973 (comment)
define: { 'process.env': {}, // to workaround the process.env error but not a permanent fix },
but it doesn't work in the production build, now it gives an error as the process is undefined!
I didn't face any such issues with other packages I'm using in the project.

Any help would be highly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant