Open CxRes opened 3 years ago
Incidentally, in the non-module case for node-main, if you use the --mixed-context flag, the error is reported twice, both in devtools for the background page as well as the loaded web page (The same thing does not happen, say, for the main file).
I apologise in advance for filing this issue in lieu of #7761. I fear that the issue will otherwise be ignored due to this new discovery being lost in subsequent comments.
NWJS Version : 0.55.0 Operating System : Windows 10 x64
Expected behavior
Errors should shows up in the devtools > console when node-main file is specified to be a module (either when specified with
.mjs
extension or"type":"module"
inpackage.json
) and there is a bug in the file, just as they do when node-main is not a es module.Actual behavior
No error shows up in the devtools > console when node-main file is specified to be a module and there is a bug in the file.
How to reproduce
package.json
node-main.js
main.js
index.html
Error is displayed in devtools > console as expected. So far so good!
Now lets add to package.json
"type"="module"
You will now find that devtools > console is empty.