Skip to content

Commit 048b40d

Browse files
committed
[bin/gentesthtml] fix path issue
1 parent 01333ea commit 048b40d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/gentesthtml.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ const readPkg = (pkgJson, pathPrefix, importMap) => {
4949
const rootPkgJson = JSON.parse(fs.readFileSync('./package.json', { encoding: 'utf8' }))
5050
readPkg(rootPkgJson, '.', exports)
5151
includeDeps.forEach(depName => {
52-
const depPkgJson = JSON.parse(fs.readFileSync(`./node_modules/${depName}/package.json`, { encoding: 'utf8' }))
53-
readPkg(depPkgJson, '.', exports)
52+
const prefix = `./node_modules/${depName}`
53+
const depPkgJson = JSON.parse(fs.readFileSync(`${prefix}/package.json`, { encoding: 'utf8' }))
54+
readPkg(depPkgJson, prefix, exports)
5455
})
5556

5657
const testHtml = `

0 commit comments

Comments
 (0)