Closed ouuan closed 1 year ago
This is a weird issue. I accidentally discovered it because I wrote $'$
in my blog and the search page went broken.
I found the bug.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_the_replacement. I only knew $1
, $2
before and this is the first time I hear of $&
, $`
and $'
.
iles
andvite
.Description 📖
If the prop of an island contains the string
$'
, it will be broken in the production build.Reproduction 🐞
https://github.com/ouuan/iles-issue-224-reproduction
The production build output:
The following snippet should be
foo:"$'"
: