Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Latest commit

 

History

History

next-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@azimutlabs/next-config

Next.js config extensions.

We assume that you already have next package installed.

Available extensions

  • withEslint - adds eslint-loader.

    • usage:
      // next.config.js
      module.exports = withEslint({
        disableLintForProd: true, // disables linting process for production build phase
        eslintOptions: {},        // options for eslint-loader
      });
    • required libs: eslint, eslint-loader, eslint-friendly-formatter.
    • download command: npm i -D eslint-loader eslint-friendly-formatter
  • withLodash - optimizes lodash dist size using lodash-webpack-plugin.

    • usage:
      // next.config.js
      module.exports = withLodash({
        lodashWebpackPluginOptions: {}, // lodash-webpack-plugin options.
      });
    • required libs: lodash-webpack-plugin.
    • download command: npm i -D lodash-webpack-plugin

Recommended usage

Combine by compose functions:

module.exports = compose(
  withEslint,
  withLodash,
)({
  poweredByHeader: false, // pass here all your next config options
  eslintOptions: {},      // as well as extensions specific options
});