Skip to content

Commit

Permalink
fix(packager): throw errors on an uncompilable entrypoint
Browse files Browse the repository at this point in the history
Fixes #66
  • Loading branch information
MarshallOfSound authored and malept committed Jan 9, 2017
1 parent 761464f commit b7f7b81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export default async (providedOptions = {}) => {

const packageJSON = await readPackageJSON(dir);

if (path.dirname(require.resolve(path.resolve(dir, packageJSON.main))) === dir) {
console.error(`${packageJSON.main}`.red);
// eslint-disable-next-line no-throw-literal
throw 'The entrypoint to your application ("packageJSON.name") must be in a subfolder not in the top level directory';
}

const forgeConfig = await getForgeConfig(dir);
let packagerSpinner;

Expand Down

0 comments on commit b7f7b81

Please sign in to comment.