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

Remove mock-core-js plugin #461

Merged
merged 1 commit into from Jul 25, 2022
Merged

Remove mock-core-js plugin #461

merged 1 commit into from Jul 25, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Jul 25, 2022

Fixes #143
Fixes #412
Fixes #448

I'm not sure why this plugin is here, but it seems to cause problems according to the issues mentioned here, and those problems are solved when this plugin is removed. Maybe older versions of vite could not handle core-js? @eirslett do you remember why you added this mock?

At any rate, since several folks have reported success when removing the plugin, let's just take it out. If we hear it causes problems for others, we can investigate further what's going on.

Copy link
Collaborator

@joshwooding joshwooding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been on my mind for a while! Happy to see it removed. If it causes any issues we can always add it back :)

@joshwooding joshwooding merged commit 659225b into main Jul 25, 2022
@joshwooding joshwooding deleted the remove-mock-core-js branch July 25, 2022 16:55
@princed
Copy link

princed commented Jul 25, 2022

I think just removing the plugin wasn't enough to solve the problem similar to one outlined in #143. In my case I also had to add core-js-pure to optimizeDeps in vite config.

@eirslett
Copy link
Collaborator

eirslett commented Jul 26, 2022

I think the problem was that core-js code is in CommonJS format, so it had to be either preoptimized (in particular: every single import path from core-js, so it would be a very long list of imports) or mocked away. Maybe things have changed with later versions of Vite?

If everything works as it should without mock-core-js then I'm sure it's better to just remove it.

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