electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Uncaught Exception: TypeError: module.Class is not a constructor #275

Open IKnowBashFu opened 6 years ago

IKnowBashFu commented 6 years ago

This occurs when using the trilogy library. Specifically, I'm set up using React+TS from electron-forge, but when trying to run npm run start, I get this error:

Uncaught Exception:
TypeError: trilogy_1.Trilogy is not a constructor

This works when using import * as Trilogy from 'trilogy';, but not when using import { Trilogy, Model } from 'trilogy';

However, I have no problem if I try building the code normally in a non-electron-compile environment. Could this be an issue with how electron-compile compiles imports?