Skip to content
Permalink
Browse files

fix(core): check packageJSON.main is set and don't enforce subdir rule

Fixes #497
Fixes #498
  • Loading branch information
MarshallOfSound committed Apr 30, 2018
1 parent c46e023 commit ebd9a95873663bc451193b18d6a6000ff3389516
Showing with 2 additions and 3 deletions.
  1. +2 −3 packages/api/core/src/api/package.ts
@@ -98,9 +98,8 @@ export default async ({

const packageJSON = await readPackageJSON(dir);

if (path.dirname(require.resolve(path.resolve(dir, packageJSON.main))) === dir) {
console.error(`Entry point: ${packageJSON.main}`.red);
throw 'The entry point to your application ("packageJSON.main") must be in a subfolder not in the top level directory';
if (!packageJSON.main) {
throw 'packageJSON.main must be set to a valid entry point for your Electron app';
}

const forgeConfig = await getForgeConfig(dir);

0 comments on commit ebd9a95

Please sign in to comment.
You can’t perform that action at this time.