Skip to content
Permalink
Browse files

fix(packager): throw errors on an uncompilable entrypoint

Fixes #66
  • Loading branch information
MarshallOfSound authored and malept committed Jan 7, 2017
1 parent 761464f commit b7f7b81c2cabd33e687e7aad04d85942436d5d4c
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/api/package.js
@@ -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;

0 comments on commit b7f7b81

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