当前位置: 代码迷 >> 综合 >> vue-cli4.0下ant-design-vue按需引入报错
  详细解决方案

vue-cli4.0下ant-design-vue按需引入报错

热度:62   发布时间:2024-01-03 13:23:07.0

error in …/node_modules/_ant-design-vue@1.6.5@ant-design-vue/es/button/style/index.less
Module build failed (from ./node_modules/less-loader/dist/cjs.js):
// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();

解决方法:

创建 vue.config.js配置文件

添加配置项:

module.exports = {
    css: {
    loaderOptions: {
    less: {
    javascriptEnabled: true,}}},
}
  相关解决方案