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

Regex JOIN_SEGMENT_SPLIT_RE broke nuxt app #224

Closed
AlexXanderGrib opened this issue Mar 17, 2024 · 5 comments · Fixed by #226
Closed

Regex JOIN_SEGMENT_SPLIT_RE broke nuxt app #224

AlexXanderGrib opened this issue Mar 17, 2024 · 5 comments · Fixed by #226

Comments

@AlexXanderGrib
Copy link

AlexXanderGrib commented Mar 17, 2024

Environment

ufo 1.5.1
iOS 15.7.2

Reproduction

https://stackblitz.com/edit/vitejs-vite-fsmpag?file=main.js,index.html&terminal=dev

Or better, just run the code on any online js evaluator:

const JOIN_SEGMENT_SPLIT_RE = /(?<!\/)\/(?!\/)/;

Describe the bug

Following line completely breaks nuxt app on iOS preventing hydration

3910926#diff-39b2554fd18da165b59a6351b1aafff3714e2a80c1435f2de9706355b4d32351R17

const JOIN_SEGMENT_SPLIT_RE = /(?<!\/)\/(?!\/)/;

image
image

Additional context

No response

Logs

No response

@pi0
Copy link
Member

pi0 commented Mar 18, 2024

This issue is hotfixed via #226 with ufo@1.5.2.

Please make sure to update lockfile manually (or for nuxt, using npx nuxi upgrade --force), remove node_modules if issue presists an check pnpm why ufo or npm why ufo to see why an older version of ufo might have been stalled.

@chenzhaozheng
Copy link

Environment

nuxt: 3.11.1
ios: 16.1.2

Describe the bug

Following line completely breaks nuxt app on iOS preventing hydration

image image image image image

@pi0
Copy link
Member

pi0 commented Mar 20, 2024

joinRelativeURL is only a new utility that requires recent browser support. We need to check with downstream framework usages.

@chenzhaozheng
Copy link

joinRelativeURL is only a new utility that requires recent browser support. We need to check with downstream framework usages.

"nuxt generate --dotenv .env.test" found that if it was originally corrected the code, it would be normal, but the flag was attached after the command was packaged, resulting in an abnormality in the product

@pi0
Copy link
Member

pi0 commented Mar 20, 2024

update: #228 nuxt/nuxt#26393 (comment)

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 a pull request may close this issue.

3 participants