静态加载 例:
import { history, RequestConfig } from ‘umi‘;
动态加载 例:
<button>点击按钮</button>
<script>
document.querySelector(‘button‘).addEventListener(‘click‘,()=>{
let hd = import("./hd.js").then(module => {
console.log(module.site);
});
})
</script>
静态加载模块及动态加载模块
原文:https://www.cnblogs.com/conlin/p/14228604.html