/ js

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

原因

使用npm安装cesium遇到这个报错

解决方案

忽视这个警告

// vue.config.js
module.exports = {
  configureWebpack: config => {
      config.module.unknownContextCritical = false
  }
}
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
分享