Skip to content

Commit d015cdd

Browse files
authored
chore(vite): support define replacement without removing double quotes (#2677)
1 parent 40c60ec commit d015cdd

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0-beta.6",
44
"description": "Vite & Vue powered static site generator",
55
"type": "module",
6-
"packageManager": "[email protected].9",
6+
"packageManager": "[email protected].10",
77
"main": "dist/node/index.js",
88
"types": "types/index.d.ts",
99
"exports": {
@@ -102,7 +102,7 @@
102102
"mark.js": "8.11.1",
103103
"minisearch": "^6.1.0",
104104
"shiki": "^0.14.3",
105-
"vite": "^4.4.6",
105+
"vite": "^4.4.7",
106106
"vue": "^3.3.4"
107107
},
108108
"devDependencies": {

pnpm-lock.yaml

+11-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/app/utils.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ export function pathToFile(path: string) {
5858
pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]
5959
}
6060
if (!pageHash) return null
61-
pagePath = `${base}${__ASSETS_DIR__.replace(
62-
/"(.+)"/,
63-
'$1'
64-
)}/${pagePath}.${pageHash}.js`
61+
pagePath = `${base}${__ASSETS_DIR__}/${pagePath}.${pageHash}.js`
6562
} else {
6663
// ssr build uses much simpler name mapping
6764
pagePath = `./${sanitizeFileName(

0 commit comments

Comments
 (0)