ES2020新特性中,允许js文件动态引入,并且不需要模块处理器可直接使用,如:
const a = async (num) => {
if (num === 1) {
const b = await import('../xx.js')
}
}
a(1)
ES2020新特性中,允许js文件动态引入,并且不需要模块处理器可直接使用,如:
const a = async (num) => {
if (num === 1) {
const b = await import('../xx.js')
}
}
a(1)