-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Reintroduce support for Webpack 4 in Vue Apollo Composable #1220
Comments
Per the webpack team, transpiling dependencies is not a bad idea. Instead of going with the lower common denominator (IE) leading to shipping older and heavier code, it would probably better that the ecosystem goes towards the opposite = let the final 'user' decide what to transpile to which target - especially when the code being transpiled is fully valid standard JS. |
@Akryum, I completely agree. But am I correct in observing that in this case the lowest common denominator is acorn 6, used by webpack 4, installed by the Vue CLI for projects in Vue 2, which is still the current version of Vue? |
Yes, that's why I said I'll change the target accordingly. |
Cool. I probably mistakenly interpreted your comment as considering not going back. |
Description
@vue/apollo-composable
4.0.0-alpha.13 broke support for webpack 4 by using a nullish coalescing operator.As discussed in issue #1217, webpack 4 uses acorn 6, while support for the nullish coalescing operator was only added in acorn 7.
Users of webpack 4 will now get the error:
Module parse failed: Unexpected token (19:103)
.Reintroducing support for webpack 4 would be especially useful for users who have abstracted away webpack.
Proposed solution
On issue #1217, @Akryum commented that he would probably lower the esbuild target to what acorn 6 understands.
Alternatives
Alternatives are upgrading to webpack 5 or freezing
@vue/apollo-composable
at 4.0.0-alpha.12.I see that @tobiasdiez from issue #1217 has resorted to transpiling
@vue/apollo-composable
with babel.Updating to webpack 5 is hard for those who use
@vue/cli-service
to abstract away webpack. Manually transpiling@vue/apollo-composable
is also not ideal.Since I believe the intention is to reintroduce support for webpack 4 within
@vue/apollo-composable
, I'm currently holding at 4.0.0-alpha.12.The text was updated successfully, but these errors were encountered: