Skip to content

Commit da2c4f6

Browse files
authored
fix: bump vite and fix win32 path resolving (#198)
1 parent 69f85c5 commit da2c4f6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"prismjs": "^1.20.0",
8989
"sirv": "^1.0.10",
9090
"slash": "^3.0.0",
91-
"vite": "^2.0.0-beta.2",
91+
"vite": "^2.0.0-beta.4",
9292
"vue": "^3.0.5"
9393
},
9494
"devDependencies": {

src/node/build/render.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import path from 'path'
22
import fs from 'fs-extra'
33
import { SiteConfig, resolveSiteDataByRoute } from '../config'
44
import { HeadConfig } from '../../../types/shared'
5+
import { normalizePath } from 'vite'
56
import { RollupOutput, OutputChunk, OutputAsset } from 'rollup'
67

78
const escape = require('escape-html')
@@ -88,7 +89,7 @@ function resolvePageImports(
8889
// find the page's js chunk and inject script tags for its imports so that
8990
// they are start fetching as early as possible
9091

91-
const srcPath = path.resolve(config.root, page)
92+
const srcPath = normalizePath(path.resolve(config.root, page))
9293
const pageChunk = result.output.find(
9394
(chunk) => chunk.type === 'chunk' && chunk.facadeModuleId === srcPath
9495
) as OutputChunk

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6031,10 +6031,10 @@ [email protected]:
60316031
core-util-is "1.0.2"
60326032
extsprintf "^1.2.0"
60336033

6034-
vite@^2.0.0-beta.2:
6035-
version "2.0.0-beta.2"
6036-
resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0-beta.2.tgz#5ea8fd4a01d0f722db59bff2bdc4ae24ba9fa63a"
6037-
integrity sha512-bZ2IeW+Uo4A7HpRIqyyHUDk6/WOGIkNdTm5/0yLmgjvXgLErwUhzv7Z0T0C6lc4lwoQV9KEA8IbFkZ+ZyWzhWg==
6034+
vite@^2.0.0-beta.4:
6035+
version "2.0.0-beta.4"
6036+
resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.0-beta.4.tgz#6ea8e08ae5e6b510548d02ec770d34046622aef7"
6037+
integrity sha512-V0HV6xyUPQ9ktJ8gLm0Et7zTFtp8WmISsH/K+FuGF3aJ4VJOlSYEaget1nHCauUPI7WDPe97suz7SCIVHW2iEg==
60386038
dependencies:
60396039
esbuild "^0.8.26"
60406040
postcss "^8.2.1"

0 commit comments

Comments
 (0)