学写慕课网的Vue核心技术Vue+Vue-Router+Vuex+SSR实战精讲时,发现因为webpack,babel等升级了。按照视频的代码配置webpack会出问题。

报错:TypeError: Cannot read property 'bindings' of null

原因:可能没有装babel cli等

npm install --save-dev @babel/cli @babel/core @babel/preset-env

安装以后,要更改老的.babelrc配置

vue webpack配置Error

{
    "presets": ["env"]
}

改为:

{
    "presets": [
        "@babel/preset-env"
    ]
}

webpack.config.base.js 所有webpack共同需要使用的配置放进去,类似于基类

相关文章:

  • 2021-09-14
  • 2021-11-13
  • 2021-12-27
  • 2021-06-26
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-06-08
  • 2021-06-25
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
相关资源
相似解决方案