SolidZORO / next-plugin-antd-less

🎩 Use Antd (Less) with Next.js v12, Zero Dependency on other Next-Plugins.
MIT License
345 stars 48 forks source link

Less modules not working #5

Closed llamadeus closed 3 years ago

llamadeus commented 3 years ago

When using the snippet provided in the docs, I cannot make less modules work.

Here is my setup: "next-plugin-antd-less": "^0.0.6" "next": "9.5.3"

/// next.config.js
const withAntdLess = require('next-plugin-antd-less');
const config = withAntdLess({
    lessVarsFilePath: './src/styles/theme.less',
    cssLoaderOptionsModules: {
        localIdentName: '[local]___[hash:base64:5]',
    },
});

module.exports = config;
/// .babelrc
{
    "presets": [
        "next/babel"
    ],
    "plugins": [
        [
            "import",
            {
                "libraryName": "antd",
                "style": true
            }
        ]
    ]
}

Edit: I just read the docs again. Is this plugin even supposed to enable less modules? If not, please feel free to close this issue.

SolidZORO commented 3 years ago

https://github.com/SolidZORO/next-plugin-antd-less/blob/757f8df159242a5b772eba0ada225a0dd2260899/index.js#L83