We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 761464f commit b7f7b81Copy full SHA for b7f7b81
src/api/package.js
@@ -50,6 +50,12 @@ export default async (providedOptions = {}) => {
50
51
const packageJSON = await readPackageJSON(dir);
52
53
+ if (path.dirname(require.resolve(path.resolve(dir, packageJSON.main))) === dir) {
54
+ console.error(`${packageJSON.main}`.red);
55
+ // eslint-disable-next-line no-throw-literal
56
+ throw 'The entrypoint to your application ("packageJSON.name") must be in a subfolder not in the top level directory';
57
+ }
58
+
59
const forgeConfig = await getForgeConfig(dir);
60
let packagerSpinner;
61
0 commit comments