Closed simonbuchan closed 1 month ago
Well isolated! I can imagine it must have been a hard one to find. Fix in https://github.com/guybedford/es-module-lexer/pull/178 will post the release out now.
👍 Wow, nice work! Really saving my butt here!
I was banging my head against trying to work around this one, forcing v1.5.0 simply hit the other issue, so I was down to trying to see if I could inject a plugin that would replace of
in the minified chunk without just colliding with something else... skin-crawling stuff 😅
Argh. Of course, we're going through vite
, which bundles you in with their distribution. I'll have to open an issue over there too, though at least I can try a vendored / patched build for now.
To close the loop: https://github.com/vitejs/vite/pull/17555
Similar, but not the same issue as #173
Minimal source code:
Error stack:
Requires:
of
/
(of / 2)
is fine, but switchingif
towhile
is not)So probably the context/backtracking getting confused by the not-quite keyword.
Reproduces in
1.5.1
to1.5.3
, but not in1.5.0
or1.4.2
We had the poor luck to have this be spit out into our vite output chunks, which made this very confusing to debug!