README
@shuta/commons-chunk-config
关于
官方 @zeit/next-css/commons-chunk-config
的替代品。
官方代码有plugins数组兼容bug。
使用
下面是在 next
项目中同时使用 less
和 css
的配置示例。
// next.config.js
const withLess = require('@zeit/next-less');
const withCss = require('@zeit/next-css');
const commonsChunkConfig = require('@shuta/commons-chunk-config');
module.exports = withLess(withCss({
webpack: (config) => {
// do something here
return commonsChunkConfig(config, /\.(less|css)$/);
}
}));