create new thread at main process but get SyntaxError: Cannot use import statement outside a module #16015
Unanswered
DeepJoyPo
asked this question in
CLI - Electron mode
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My app is built on
quasar
+electron
+vue
。And I have two questions:esm
import statements andcjs
import statements(require). How does this work? I think generally mixing use these two types is not allowed.SyntaxError: Cannot use import statement outside a module
. I don't know why this happened. As I mention above, I already useesm
import statements in electron-main.ts and all goes well. It seems that the new thread detaches from the frame context and looks for thepackage.js
So, what's the magic here?
Beta Was this translation helpful? Give feedback.
All reactions