Use require to load package json
This commit is contained in:
parent
d42d10a47c
commit
88fe667f66
1 changed files with 1 additions and 1 deletions
|
@ -229,7 +229,7 @@ function loadApplicationPackage (packagePath) {
|
||||||
if (fs.existsSync(packageJsonPath)) {
|
if (fs.existsSync(packageJsonPath)) {
|
||||||
let packageJson
|
let packageJson
|
||||||
try {
|
try {
|
||||||
packageJson = JSON.parse(fs.readFileSync(packageJsonPath))
|
packageJson = require(packageJsonPath)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${e.message}`)
|
showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${e.message}`)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue