ソースコード
{
"scripts": {
"start": "node -r esm index.js"
},
"dependencies": {
"esm": "^3.2.25"
}
}
export const hoge = str => {
return str;
};
import { hoge } from './hoge';
console.log(hoge('hello'));
コマンド
$ npm start
{
"scripts": {
"start": "node -r esm index.js"
},
"dependencies": {
"esm": "^3.2.25"
}
}
export const hoge = str => {
return str;
};
import { hoge } from './hoge';
console.log(hoge('hello'));
$ npm start