less-loader报错:this.getOptions is

2021-05-19  本文已影响0人  踏莎行

今天打包less时报错,


Snipaste_2021-05-19_09-12-46.png

原因是less和less-loader版本过高导致的,降低版本即可
这是我的package.json

  ...
  "dependencies": {
    "core-js": "^2.6.5",
    "vue": "^2.6.10",
    "vue-router": "^3.5.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.12.0",
    "@vue/cli-plugin-eslint": "^3.12.0",
    "@vue/cli-service": "^3.12.0",
    "@vue/eslint-config-standard": "^4.0.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "vue-template-compiler": "^2.6.10",
    "less": "^4.0.0",
    "less-loader": "^7.1.0"
  }
  ...
}
上一篇下一篇

猜你喜欢

热点阅读