0
点赞
收藏
分享

微信扫一扫

Inline JavaScript is not enabled. Is it set in your options?

7dcac6528821 2022-03-30 阅读 71
vue.js前端

使用 ant-design-vue时,错误信息

 ERROR  Failed to compile with 1 error

 error  in ./node_modules/ant-design-vue/dist/antd.less

Syntax Error:

// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?

解决方法

less-load版本低于6.0时:vue.config.js 配置

module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      less: {
        javascriptEnabled: true
      }
    }
  }
})

less-load版本高于6.0时:vue.config.js 配置

module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          javascriptEnabled: true
        }
      }
    }
  }
})
举报

相关推荐

0 条评论