GithubHelp home page GithubHelp logo

Comments (5)

mzohaibqc avatar mzohaibqc commented on June 2, 2024

Seems like your issue with your less-loader configurations

from antd-theme-webpack-plugin.

lichnow avatar lichnow commented on June 2, 2024

@mzohaibqc I change the less-loader config,and is also not work

webpackConfig.module?.rules.push({
        test: /\.less$/,
        use: [
            {
                loader: 'style-loader',
            },
            {
                loader: 'css-loader',
                options: {
                    importLoaders: 1,
                },
            },
            {
                loader: 'less-loader',
                options: {
                    lessOptions: {
                        javascriptEnabled: true,
                        modifyVars: { '@primary-color': '#1DA57A' },
                    },
                },
            },
        ],
    });

from antd-theme-webpack-plugin.

mzohaibqc avatar mzohaibqc commented on June 2, 2024

Can you create a sample project and reproduce this issue. I'll look into that.
First thing, try [email protected] which you are importing in index.html file or use this cdn url which I am using in different examples https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js.

antDir: '/xxx/admin/node_modules/antd',
  stylesDir: '/xxx/admin/apps/admin/src/styles',
  varFile: '/xxx/admin/apps/admin/src/styles/variables.less',
  mainLessFile: '/xxx/admin/apps/admin/src/styles/main.less',
  themeVariables: [
    '@primary-color',
   ...
  ],
  indexFileName: 'index.html',
  generateOnce: false,
  lessUrl: 'https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js',
  publicPath: '',

from antd-theme-webpack-plugin.

lichnow avatar lichnow commented on June 2, 2024

@mzohaibqc my less version is 3.x,so it can't work fine.how to let /color.less work in 3.x,so /color.less can work with the less.js which of less-loader's used(I config the webpack copy plugin let /node_modules/less/dist/less.min.js auto copy to dist/public dir)?

from antd-theme-webpack-plugin.

mzohaibqc avatar mzohaibqc commented on June 2, 2024

I think, there is an issue with using less3.x with ant design specific less styles and function so I would say, start using [email protected] a CDN or simply download that file in your public folder and import from there. I'll update if there will any progress on this issue.

from antd-theme-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.