Open adamDilger opened 9 months ago
I've applied this as a patch in our repo and this works perfectly, thanks @adamDilger 🙌
@ayusharma @byara Would we be able to get a release for this whenever you guys had a spare moment? 🙏
I've added another bugfix onto this branch/PR, for #218 , as there would have been conflicting changes if these fixes were separated out.
If this is not valid I'm happy to revert and re-PR once the first fix has been merged
I found this issue even when $ exists in a string
replace#specifying_a_string_as_the_replacement
When vue code contained groupings such as
$'
or$$
, the call to"".replace()
would treat these as special replacements producing invalid code.Switching the replacement arg to a function returning the same string skips this logic.
The tests pass, and as this is only removing special functionality I would assume this is a safe change
EDIT: I've also added another commit to this PR which fixes having both a script and a script/setup tags in a SFC