Skip to content

Commit

Permalink
fix: config via build.lib fails when default entry point not found (#393
Browse files Browse the repository at this point in the history
)
  • Loading branch information
alex8088 committed Mar 1, 2024
1 parent 27ade03 commit ad891af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface ElectronPluginOptions {
root?: string
}

function findLibEntry(root: string, scope: string): string {
function findLibEntry(root: string, scope: string): string | undefined {
for (const name of ['index', scope]) {
for (const ext of ['js', 'ts', 'mjs', 'cjs']) {
const entryFile = path.resolve(root, 'src', scope, `${name}.${ext}`)
Expand All @@ -20,7 +20,7 @@ function findLibEntry(root: string, scope: string): string {
}
}
}
return ''
return undefined
}

function findInput(root: string, scope = 'renderer'): string {
Expand Down

0 comments on commit ad891af

Please sign in to comment.