print.js
export default function (a, b) {
console.log(a, b)
}
add.js
import print from './print.js’
export default function add (a, b) {
print(‘print’, ‘add’)
return a + b
}
test1.html
基本演示
ES6-Module src add.js print.js test1.hhtml 启动命令是 http-server -p 8081