Minimum setup to use *.module.less
NitelPhyoe opened this issue · 3 comments
NitelPhyoe commented
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
}
]
]
}
SolidZORO commented
so?
NitelPhyoe commented
SolidZORO commented
mkn/typings/custom-typings.d.ts
Line 3 in 17bfdb3
add this types file to your project.