1.0.1 • Published 6 years ago

@shuta/commons-chunk-config v1.0.1

Weekly downloads
3
License
MIT
Repository
-
Last release
6 years ago

@shuta/commons-chunk-config

关于

官方 @zeit/next-css/commons-chunk-config 的替代品。

官方代码有plugins数组兼容bug。

使用

下面是在 next 项目中同时使用 lesscss 的配置示例。

// 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)$/);
  }
}));