Skip to content

Commit

Permalink
chore: refactor string replacement for 'vue'
Browse files Browse the repository at this point in the history
  • Loading branch information
linzhe141 committed Feb 22, 2024
1 parent 4b2fd64 commit 7cecfa3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ async function doCompileScript(
)} */`
}
if (ssr) {
compiledScript.content = compiledScript.content.replaceAll(
/'vue'/g,
"'vue-esm'",
compiledScript.content = compiledScript.content.replace(
/(['"])vue\1/g,
'$1vue-esm$1',
)
}
code +=
Expand Down

0 comments on commit 7cecfa3

Please sign in to comment.