From 699bcb379f849fcc921c1b653b453dfbce2d1742 Mon Sep 17 00:00:00 2001 From: Serguei Okladnikov Date: Tue, 14 Jun 2022 14:29:17 +0300 Subject: [PATCH] fix(main): check extends section for existence --- packages/react-app-alias/src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-app-alias/src/index.js b/packages/react-app-alias/src/index.js index 74df67c..d42be1c 100644 --- a/packages/react-app-alias/src/index.js +++ b/packages/react-app-alias/src/index.js @@ -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 }