Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Breaking change introduced in 5.1.0 #431

Closed
8 of 9 tasks
yassilah opened this issue Jul 24, 2024 · 13 comments
Closed
8 of 9 tasks

Breaking change introduced in 5.1.0 #431

yassilah opened this issue Jul 24, 2024 · 13 comments

Comments

@yassilah
Copy link

Related plugins

Describe the bug

This is simply to raise a concern regarding the breaking change introduced in 5.1.0 for setting custom features (e.g. propsDestructure). My Nuxt 3 application suddenly stopped working as I'm using propsDestructure by default and it took me a while to realize that it was due to the latest @vitejs/plugin-vue package update. I'm just raising the issue in case other packages/libraries/frameworks relying on it face the same issue.

Related: nuxt/nuxt#28295

Reproduction

https://stackblitz.com/edit/github-g3udp4?file=nuxt.config.ts

Steps to reproduce

No response

System Info

-

Used Package Manager

pnpm

Logs

No response

Validations

@sxzz
Copy link
Member

sxzz commented Jul 25, 2024

Since it's an experimental feature, it doesn't follow semver.

@arpowers
Copy link

I have a breaking change in 5.1.0 as well, builds are breaking with
Expected ">" but found "lang"

It's really tough to debug as it was working locally, broken in CI. Rolling back the version to 5.0.5 fixed it.

Here is link to build
https://github.com/fictionco/fiction/actions/runs/10084436525/job/27883222507

@sxzz
Copy link
Member

sxzz commented Jul 25, 2024

Could you please provide a minimal reproduction or at least a detailed method to easily reproduce the build error on the local machine?

@arpowers
Copy link

@sxzz i would love to but I couldn't duplicate this outside of CI.

All I know is rolling back the dep fixed the problem.

Will try again in a couple days.

@s3xysteak
Copy link

@sxzz Another similar report found. dcloudio/uni-preset-vue#102

@sxzz
Copy link
Member

sxzz commented Jul 29, 2024

Should be fixed in v5.1.1

@danielroe
Copy link

I would add that although propsDestructure is experimental, I don't think the way to enable/disable it should break unexpectedly. At the very least until it is stabilised, I would suggest preserve backwards-compatibility for how to enable/disable this feature, which would be a one-line change.

@sxzz
Copy link
Member

sxzz commented Aug 1, 2024

@danielroe Thanks for your advice. It's fixed!

@danielroe
Copy link

Thank you ❤️

@scandar
Copy link

scandar commented Aug 9, 2024

I have a breaking change in 5.1.0 as well, builds are breaking with
Expected ">" but found "lang"

I'm experiencing the same error on 5.1.0 - 5.1.2, it happens when building a production build in the server bundle.

@sxzz
Copy link
Member

sxzz commented Aug 9, 2024

Could you create a new issue with a reproduction?

@negezor
Copy link

negezor commented Aug 16, 2024

@sxzz updating @vitejs/plugin-vue from version 5.1.0 to 5.1.1 breaks the PWA build. I manually reverted the changes in node_modules from this commit f5eb5ac, and everything works fine. I wasn't able to create a reproduction to demonstrate the issue. However, I can provide the error log from the build:

> vite build --ssrManifest --outDir dist/client

vite v5.4.1 building for production...
✓ 1170 modules transformed.
x Build failed in 7.20s
error during build:
[vite-plugin-pwa:build] Unexpected token, expected "," (1:8)
file: /home/negezor/projects/shiromu/web-service/src/components/EventCard.vue?vue&type=script&setup=true&lang.ts:1:8
    at constructor (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:349:19)
    at TypeScriptParserMixin.raise (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:3247:19)
    at TypeScriptParserMixin.unexpected (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:3267:16)
    at TypeScriptParserMixin.expect (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:3577:12)
    at TypeScriptParserMixin.tsParseDelimitedListWorker (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:7654:14)
    at TypeScriptParserMixin.tsParseDelimitedList (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:7631:25)
    at TypeScriptParserMixin.tsParseBracketedList (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:7671:25)
    at TypeScriptParserMixin.tsParseTypeParameters (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:7773:24)
    at /home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:9410:29
    at TypeScriptParserMixin.tryParse (/home/negezor/projects/shiromu/web-service/node_modules/@babel/parser/lib/index.js:3585:20)

For now, I have locked the version of @vitejs/plugin-vue to 5.1.0.

@sxzz
Copy link
Member

sxzz commented Aug 16, 2024

@negezor Could you please raise a new issue & provide a minimal reproduction? Thanks.

Why reproduction is required

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants