2020-08-07から1日間の記事一覧
Node.jsでES Modulesがネイティブに動く時代なのです。 Working Code // package.json { "type": "module", } // eptESM.js export const f1 = () => 1; // eptCJS.cjs const f2 = () => 2; module.exports = f2; // ipt.js import { f1 } from "./eptESM.js…
Node.jsでES Modulesがネイティブに動く時代なのです。 Working Code // package.json { "type": "module", } // eptESM.js export const f1 = () => 1; // eptCJS.cjs const f2 = () => 2; module.exports = f2; // ipt.js import { f1 } from "./eptESM.js…