electron-extensions icon indicating copy to clipboard operation
electron-extensions copied to clipboard

Cannot use import statement outside a module

Open Jenifer-TheCoder opened this issue 4 years ago • 1 comments

I had installed the electron-extensions package in my existing working Electron sample.

Pasted below lines into main process: `import { ExtensibleSession } from 'electron-extensions/main'; import { app } from 'electron';

const extensions = new ExtensibleSession();

(async () => { await app.whenReady(); extensions.loadExtension('C:/.../abcdefghijklmnoprstuwxyz'); // Path to the extension to load })();`

I am getting the above mentioned error, I tried adding type:module to the package.json file. Nothing helped, may be I need to play around a bit. Any suggestions?

Jenifer-TheCoder avatar Jan 22 '21 13:01 Jenifer-TheCoder

same here

rimonhanna avatar May 08 '21 13:05 rimonhanna