Skip to content

Commit

Permalink
fix: renderHTML indexHTML.replace when appHTML with $ (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun authored Dec 26, 2023
1 parent 8015d55 commit f4ba468
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/single-page/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const store = useRootStore()

<h3>Initial State:</h3>
<pre>{{ store.user }}</pre>

<a href="https://github.com/antfu/vite-ssg" aria-label="Permalink to &quot;Usage `^`, `$`&quot;" />
</template>

<style>
Expand Down
2 changes: 1 addition & 1 deletion src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async function renderHTML({
return indexHTML
.replace(
container,
`<div id="${rootContainerId}" data-server-rendered="true">${appHTML}</div>${stateScript}`,
() => `<div id="${rootContainerId}" data-server-rendered="true">${appHTML}</div>${stateScript}`,
)
}

Expand Down

0 comments on commit f4ba468

Please sign in to comment.