Regex JOIN_SEGMENT_SPLIT_RE broke nuxt app
AlexXanderGrib opened this issue · 5 comments
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 = /(?<!\/)\/(?!\/)/;
Additional context
No response
Logs
No response
joinRelativeURL
is only a new utility that requires recent browser support. We need to check with downstream framework usages.
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
update: #228 nuxt/nuxt#26393 (comment)