Skip to content

Commit

Permalink
fix(cli): remove requirement of leading slash in main attr (#910)
Browse files Browse the repository at this point in the history
This will fix so that both `"main": "src/index.ts"` and `"main":
"/src/index.ts"` will resolve.

Closes #908
  • Loading branch information
asbjornhaland authored May 30, 2023
1 parent 467208e commit d40951a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/ninety-lizards-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@equinor/fusion-framework-cli': patch
---

Removes requirement of leading slash in `main` attr in `package.json`, meaning
both `"main": "src/index.ts"` and `"main": "/src/index.ts"` will resolve.
2 changes: 1 addition & 1 deletion packages/cli/src/scripts/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const resolveAppConfig = async (): Promise<LocalConfig> => {
{
version: pkg.version,
name: pkg.name,
main: pkg.main,
main: pkg.main.startsWith('/') ? pkg.main : `/${pkg.main}`,
__DEV__: { root, configSource: appConfig.configSource, portal: appConfig.portalHost },
}
);
Expand Down

0 comments on commit d40951a

Please sign in to comment.