next9 start normal but failed packaging
ZeroJsus opened this issue · 1 comments
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,
},
});`
I reslove this problem.