• electron-vue 引入 vue.ant.design报错


     ERROR in ./node_modules/ant-design-vue/dist/antd.less (./node_modules/css-loader!./node_modules/less-loader/dist/cjs.js!./node_modules/ant-design-vue/dist/antd.less)
      Module build failed (from ./node_modules/less-loader/dist/cjs.js):
      
      
      // https://github.com/ant-design/ant-motion/issues/44
      .bezierEasingMixin();
      ^
      Inline JavaScript is not enabled. Is it set in your options?
            in D:demomy-project
    ode_modulesant-design-vuelibstylecolorezierEasing.less (line 110, column 0)
       @ ./node_modules/ant-design-vue/dist/antd.less 4:14-94 14:3-18:5 15:22-102
       @ ./src/renderer/main.js
       @ multi ./.electron-vue/dev-client ./src/renderer/main.js
    

    解决办法:

    https://github.com/ant-design/ant-motion/issues/44

    在webpack.renderer.config.js
    修改 less的配置
    原来: 
          {
            test: /.less$/,
            use: ['vue-style-loader', 'css-loader', 'less-loader']
          },
    
    修改为:
    
          {
            test: /.less$/,
            use: [
              {
                loader: "style-loader"
              },
              {
                loader: "css-loader",
                options: { 
                  importLoaders: 1 
                }
              },
              {
                loader: "less-loader",
                options: {
                  javascriptEnabled: true
                }
              }
            ]
          }
    

    刚开始可能还没有安装less 和 loader-less,node-less需要自己安装

    有可能是less的问题, "less": "^2.7.3", "less-loader": "^4.1.0", 把less版本降到3.0以下,我这边就没问题了。
    重新做了

  • 相关阅读:
    Constructor构造方法
    overload重载
    static关键字
    this关键字
    继承
    ORACLE数据库 常用命令和Sql常用语句
    常见单词
    L贪心基础
    J贪心
    K贪心
  • 原文地址:https://www.cnblogs.com/ybixian/p/11275253.html
Copyright © 2020-2023  润新知