SolidZORO/mkn

Minimum setup to use *.module.less

NitelPhyoe opened this issue · 3 comments

I use Typescript
My setup are
//next.config.js
const withAntdLess = require("next-plugin-antd-less");
const path = require("path");

module.exports = withAntdLess({
lessVarsFilePath: path.join(__dirname, "./styles/antd-custom.less"),
cssLoaderOptions: {
esModule: false,
sourceMap: false,
modules: {
mode: "local",
},
},

// Other NextConfig Here...
webpack(config) {
	return config;
},

});

//.babelrc
{
"presets": [
"next/babel"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"style": true
}
]
]
}

so?

with this setup i can't use *.module.less in *.tsx

image

declare module '*.less';

add this types file to your project.