intoli / antd-scss-theme-plugin

A Webpack plugin for customizing Ant Design with an SCSS theme file and using Ant Design's compiled variables in SCSS files throughout your project.
https://intoli.com/blog/antd-scss-theme-plugin/
Other
202 stars 81 forks source link

Webpack 4 and less 3 issues #112

Open devil9108 opened 2 years ago

devil9108 commented 2 years ago

Getting below issue after adding the antd-scss-theme-plugin to our project. we are using wepack: 4.40.2, less: 3.10.3, less-loader: 5.0.0, antd: 3.23.4

At first got the below error

`position: absolute;
top: 8px + @font-size-base * @line-height-base / 2 - @font-size-base / 2;`

After adding strictMath: true above error resolved.

After that got the below error

 &-loading-icon {
      .iconfont-size-under-12px(10px);
    ^
Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
      in D:\Phoenix-spa\node_modules\antd\lib\cascader\style\index.less (line 217, column 6)

Its not resolving. Any one please help me on this.

At present my plugin code is like below

AntdScssThemePlugin.themify({
    loader: 'less-loader',
    options: {
        javascriptEnabled: true,
        strictMath: true,
        sourceMap: isEnvProduction && shouldUseSourceMap
    }
})