Warning: Undefined global variable $debug in /var/www/ourcoders/tiny4cocoa/application/controllers/baseController.php on line 124
ruanyf 2020-01-21 00:00:00 发布的技术动态 - OurCoders (我们程序员)
ruanyf
2020-01-21 00:00:00 发布
(接上条)Node.js 对ES模块的处理方法就不对,现在必须脚本后缀名为.mjs,或者package.json里面注明type:"module"。

正确做法应该是默认就支持标准,如果要支持非标准的CommonJS模块,才需要特别声明。网页链接