Skip to content

Commit

Permalink
chore(vite): support define replacement without removing double quotes (
Browse files Browse the repository at this point in the history
  • Loading branch information
zonemeen authored Jul 26, 2023
1 parent 40c60ec commit d015cdd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0-beta.6",
"description": "Vite & Vue powered static site generator",
"type": "module",
"packageManager": "pnpm@8.6.9",
"packageManager": "pnpm@8.6.10",
"main": "dist/node/index.js",
"types": "types/index.d.ts",
"exports": {
Expand Down Expand Up @@ -102,7 +102,7 @@
"mark.js": "8.11.1",
"minisearch": "^6.1.0",
"shiki": "^0.14.3",
"vite": "^4.4.6",
"vite": "^4.4.7",
"vue": "^3.3.4"
},
"devDependencies": {
Expand Down
20 changes: 11 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/client/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ export function pathToFile(path: string) {
pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]
}
if (!pageHash) return null
pagePath = `${base}${__ASSETS_DIR__.replace(
/"(.+)"/,
'$1'
)}/${pagePath}.${pageHash}.js`
pagePath = `${base}${__ASSETS_DIR__}/${pagePath}.${pageHash}.js`
} else {
// ssr build uses much simpler name mapping
pagePath = `./${sanitizeFileName(
Expand Down

0 comments on commit d015cdd

Please sign in to comment.