Skip to content

Commit

Permalink
Merge pull request #79 from oklas/extends-checking
Browse files Browse the repository at this point in the history
fix(main): check extends section for existence
  • Loading branch information
oklas authored Sep 9, 2022
2 parents b5c8edf + 699bcb3 commit 9452a82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-app-alias/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ function readConfig(confPath) {

const extUrl = conf.extends
const extPath = extUrl ? path.resolve(confdir, extUrl) : ''
if(extPath && !fs.existsSync(extPath))
throw Error(`react-app-alias:readConfig: '${confPath}' field 'extends' is '${extPath}' - not exists'`)
conf.extends = extUrl ? require(extPath) : {}

return conf
}

Expand Down

0 comments on commit 9452a82

Please sign in to comment.