-
Notifications
You must be signed in to change notification settings - Fork 668
Webpack compilation fails with "Module not found: Default condition should be last one" #2022
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
Comments
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. |
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? |
Oh, there is one: #2023 I will release this now. |
Can you give this a try? https://github.com/vuejs/vue-test-utils/releases/tag/v1.3.3 Thanks. |
@lmiller1990 I can confirm that this is now fixed and working as expected on the latest 1.3.3 🥳 |
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.
The text was updated successfully, but these errors were encountered: