fix(build): escape `$` in replace pattern in dynamic routes plugin

closes #4499
pull/4502/head
Divyansh Singh 8 months ago
parent 36eb751ed7
commit e8129167c7

@ -132,7 +132,10 @@ export const dynamicRoutesPlugin = async (
// we use a special injection syntax so the content is rendered as // we use a special injection syntax so the content is rendered as
// static local content instead of included as runtime data. // static local content instead of included as runtime data.
if (content) { if (content) {
baseContent = baseContent.replace(/<!--\s*@content\s*-->/, content) baseContent = baseContent.replace(
/<!--\s*@content\s*-->/,
content.replace(/\$/g, '$$$')
)
} }
// params are injected with special markers and extracted as part of // params are injected with special markers and extracted as part of

Loading…
Cancel
Save