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

Webpack compilation fails with "Module not found: Default condition should be last one" #2022

Closed
3rdvision opened this issue Nov 3, 2022 · 5 comments

Comments

@3rdvision
Copy link
Contributor

3rdvision commented Nov 3, 2022

Subject of the issue

Webpack 5.68.0 fails compilation and throws the error message "Module not found: Default condition should be last one". Affected vue-test-utils versions are 1.3.1 onwards.

Expected behaviour

Compilation is successful.

Actual behaviour

Compilation fails with error.

Possible Solution

Change the order of the default import line here. This convention is being implemented in other places example.
I see no reason why it shouldn't be here. This was introduced here where the issue had a properly ordered example. Maybe it was done by mistake when using a prettier tool? Please @sheremet-va let us know if there's any strong reason why the default should be first instead of last.

@sheremet-va
Copy link

sheremet-va commented Nov 3, 2022

Yes, I think default should be last as a fallback. It’s also interesting that test-utils doesn’t bundle mjs anymore? Is there any reason for that? I explaned why it’s need in the mentioned issue.

@lmiller1990
Copy link
Member

I tried to fix it here https://github.com/vuejs/vue-test-utils/pull/2020/files. I guess the order matters? I had no idea. I've never seen "Module not found: Default condition should be last one" before.

Would someone like to make a PR?

@lmiller1990
Copy link
Member

Oh, there is one: #2023

I will release this now.

@lmiller1990
Copy link
Member

Can you give this a try? https://github.com/vuejs/vue-test-utils/releases/tag/v1.3.3

Thanks.

@3rdvision
Copy link
Contributor Author

@lmiller1990 I can confirm that this is now fixed and working as expected on the latest 1.3.3 🥳
Thank you for the fast response!

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

3 participants