解决懒加载的副作用
index.js
document.addEventListener('click', () => {
import(/* webpackPrefetch: true */ 'lodash').then(({ default: { join } }) => {
console.log(join([1, 2, 3], '-'))
})
import(/* webpackPreload: true */ 'lodash').then(({ default: { join } }) => {
console.log(join([1, 2, 3], '-'))
})
})