Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Handle unknown compilers nicer, fallback to passthrough #163

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/compiler-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ export default class CompilerHost {
if (!compiler) {
compiler = this.fallbackCompiler;

let { code, binaryData, mimeType } = await compiler.get(filePath);
if (!compiler) {
compiler = this.getPassthroughCompiler();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this is correct, for complicated weird reasons. Do you have a repro file that you hit this with?

Copy link
Member Author

@MarshallOfSound MarshallOfSound Jan 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just running electron-forge package and then launching the packaged app

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Imma fix this today

}

let { code, binaryData, mimeType } = await this.cachesForCompilers.get(compiler).get(filePath);
return { code: code || binaryData, mimeType };
}

Expand Down