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

next9 start normal but failed packaging #89

Closed ZeroJsus closed 2 years ago

ZeroJsus commented 2 years ago

Hi, I have a problem. When I use next-plugin-antd-less in my project. I run it with next start, it works well; but when i run it with next build it failed.

here is my next.config.js `const withAntdLess = require('next-plugin-antd-less');

module.exports = withAntdLess({ // optional // modifyVars: { '@primary-color': '#04f' }, // optional // lessVarsFilePath: './src/styles/variables.less', // optional lessVarsFilePathAppendToEndOfContent: false, // optional https://github.com/webpack-contrib/css-loader#object cssModules: true, cssLoaderOptions: {},

// Other Config Here...

webpack(config) { return config; },

// ONLY for Next.js 10, if you use Next.js 11, delete this block future: { webpack5: true, }, });`

// run next build error less build error

ZeroJsus commented 2 years ago

I reslove this problem.