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

Include core-js package in package.json #335

Merged
merged 5 commits into from
Jun 12, 2019
Merged

Conversation

Demivan
Copy link
Contributor

@Demivan Demivan commented Jun 10, 2019

Fixes #332

@Grsmto
Copy link
Owner

Grsmto commented Jun 10, 2019

Hi,
Thanks for your contribution.
Does this actually fixes the issue? As I suppose you'll have both core-js 2 and 3 as dependency but they can't work concurrently so I'm not sure to see how that would fix it?
If you check the simplebar package, there is the corejs 3 configuration in place there. Maybe there should just be the same thing in the vue package?

@Demivan
Copy link
Contributor Author

Demivan commented Jun 10, 2019

Yeah. It fixed this issue for me.
Right now issue is that simplebar-vue does not have core-js package specified as dependency at all. It just uses hoisted package version, so if app has core-js@3 in its package.json it will try to use that. It does not use core-js@3 dependency from simplebar package. And even if it did it would not work because current babel config for simplebar-vue generates core-js imports using version 2 format.
Best solution would, probably, be to update vue related dependencies (babel preset) for simplebar-vue and switch to core-js@3.
I can update this pull-request to include that.

@Demivan
Copy link
Contributor Author

Demivan commented Jun 10, 2019

Just checked vue packages and @vue/babel-preset-app@3.8.0 is not updated to core@3 yet. And version 4, where it is updated, is in alpha.

@Demivan
Copy link
Contributor Author

Demivan commented Jun 10, 2019

I have removed @vue/cli-service and related packages - they were used mostly for tests. Instead I have added vue-jest and used jest directly for tests. Additionally I have removed @vue/babel-preset-app and used just @babel/preset-env. This allowed me to switch to core-js@3.
Tests are passing, but I will test tomorrow on my project for both core-js@2 and core-js@3
Another benefit of these changes are 3.5k lines removed from yarn.lock 🙂

@Demivan
Copy link
Contributor Author

Demivan commented Jun 11, 2019

Just tested and it worked in both cases: when app is targeting core-js@2 and when core-js@3

@Grsmto Grsmto merged commit e08a99e into Grsmto:master Jun 12, 2019
@Demivan Demivan deleted the fix-core-js branch June 12, 2019 13:43
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

Successfully merging this pull request may close these issues.

simplebar-vue does not work with core-js@3
2 participants