Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less-loader support please #273

Closed
partoneplay opened this issue Mar 26, 2021 · 2 comments
Closed

less-loader support please #273

partoneplay opened this issue Mar 26, 2021 · 2 comments

Comments

@partoneplay
Copy link

partoneplay commented Mar 26, 2021

The craco-less craco-antd project is almost dead.

I read doc less-loader and my craco.config.js

module.exports = {
  webpack: {
    alias: alias,
    configure: {
      module: {
        rules: [{
          test: /\.less$/,
          use: [{
            loader: 'less-loader', // compile Less to CSS
            options: {
              lessOptions: {
                modifyVars: {
                  // antd customize
                  'primary-color': '#038952',
                  'layout-header-background': '#0B7E4F',
                  'layout-sider-background': '#ffffff',
                },
                javascriptEnabled: true,
              },
            },
          }],
        }],
      },
    },
  },
};

But it does't work.

I must use craco@^6.0.0

@wangpeng1994
Copy link

@partoneplay
Copy link
Author

Below article might be help?~

https://github.com/xtech-guru/create-react-app/blob/add-less-support/docusaurus/docs/adding-a-less-stylesheet.md

Note: this feature is available with [email protected] and higher.

The current latest version is 4.0.3. So I have to wait for official update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants