當前目錄下,或者上級目錄中的package.json含有"type": "module"時,該模塊會被當作ES Module。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // my-app.js, in an ES module package scope because there is a package.json // file in the same folder with "type": "module". import'./startup/init...
www.dbjr.com.cn/article/1750...htm 2019-11-25