mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-04 22:38:43 +00:00
Comment so we don't forget
This commit is contained in:
+1
-1
@@ -283,7 +283,7 @@ export default async function createApp(vite) {
|
|||||||
const safeProps = JSON.stringify(props).replace(/<(?=\/?script)/ig, '\\u003c');
|
const safeProps = JSON.stringify(props).replace(/<(?=\/?script)/ig, '\\u003c');
|
||||||
html = html.replace(
|
html = html.replace(
|
||||||
'<head>',
|
'<head>',
|
||||||
()=>{
|
()=>{ //Replace must use a function instead of string, else brews with `$` in contents are treated as replacement patterns
|
||||||
return `<head>\n`
|
return `<head>\n`
|
||||||
+ `<script id="props">`
|
+ `<script id="props">`
|
||||||
+ `window.__INITIAL_PROPS__ = ${safeProps
|
+ `window.__INITIAL_PROPS__ = ${safeProps
|
||||||
|
|||||||
Reference in New Issue
Block a user