Skip to content

Commit

Permalink
fix: bump vite and fix win32 path resolving (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Jan 4, 2021
1 parent 69f85c5 commit da2c4f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"prismjs": "^1.20.0",
"sirv": "^1.0.10",
"slash": "^3.0.0",
"vite": "^2.0.0-beta.2",
"vite": "^2.0.0-beta.4",
"vue": "^3.0.5"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/node/build/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import path from 'path'
import fs from 'fs-extra'
import { SiteConfig, resolveSiteDataByRoute } from '../config'
import { HeadConfig } from '../../../types/shared'
import { normalizePath } from 'vite'
import { RollupOutput, OutputChunk, OutputAsset } from 'rollup'

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

const srcPath = path.resolve(config.root, page)
const srcPath = normalizePath(path.resolve(config.root, page))
const pageChunk = result.output.find(
(chunk) => chunk.type === 'chunk' && chunk.facadeModuleId === srcPath
) as OutputChunk
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6031,10 +6031,10 @@ [email protected]:
core-util-is "1.0.2"
extsprintf "^1.2.0"

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

0 comments on commit da2c4f6

Please sign in to comment.