关于模块导入导出的问题
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9"// mod.js
module.exports = 'xx'
// app.js
import mod1 from './mod'
import * as mod2 from './mod'
console.log(mod1)
console.log(mod2)
// xx
// xx// c.js
module.exports = function two() {
return 2;
};
// es.js
import foo from './c';
foo(); // 2
import * as bar from './c';
bar.default(); // 2
bar(); // throws, bar is not a functionLast updated