node-network-import-test
Scrapboxのコードブロックで書いたスクリプトを実行できそう。
このコードをNode.jsで実行させる。
code: index.js
export const main = () => {
console.log("Hello!!");
};
ローカル環境に、ブートローダーのようなmjsファイルが必要。
code: node-network-import-test.mjs
main();
code: bash
$ node --experimental-network-imports node-network-import-test.mjs
(node:54622) ExperimentalWarning: Network Imports is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
Hello!!