herberttn / bytenode-webpack-plugin

Compile JavaScript into bytecode using bytenode
MIT License
102 stars 26 forks source link

Unexpected token 'export' Electronjs ByteNode #25

Open mcjambi opened 1 year ago

mcjambi commented 1 year ago

I meet a very new error:

SyntaxError: Unexpected token 'export' at new Script (node:vm:100:7) at Object.compileCode (C:\GitHub... (remove) ...\node_modules\bytenode\lib\index.js:28:18)

It is still working but error throw to terminal while i am building production.

my Typescript config like this:

"module": "CommonJS", "target": "es2022"

herberttn commented 1 year ago

@mcjambi can you make a reproduction repository so I can try to fix it?

herberttn commented 1 year ago

@mcjambi does this still happen? If so, can you create a reproduction repo?