File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ console.log(chalk.cyan(`vitepress v${require('../package.json').version}`))
6
6
console . log ( chalk . cyan ( `vite v${ require ( 'vite/package.json' ) . version } ` ) )
7
7
8
8
const command = argv . _ [ 0 ]
9
+ const root = argv . _ [ command ? 1 : 0 ]
10
+ if ( root ) {
11
+ argv . root = root
12
+ }
9
13
10
14
if ( ! command || command === 'dev' ) {
11
15
const port = argv . port || 3000
12
- const root = command === 'dev' && argv . _ [ 1 ]
13
- if ( root ) {
14
- argv . root = root
15
- }
16
16
require ( '../dist/node' )
17
17
. createServer ( argv )
18
18
. then ( ( server ) => {
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ function resolvePageImports(
84
84
// find the page's js chunk and inject script tags for its imports so that
85
85
// they are start fetching as early as possible
86
86
87
- const srcPath = path . join ( config . root , page )
87
+ const srcPath = path . resolve ( config . root , page )
88
88
const pageChunk = result . assets . find (
89
89
( chunk ) => chunk . type === 'chunk' && chunk . facadeModuleId === srcPath
90
90
) as OutputChunk
You can’t perform that action at this time.
0 commit comments