0.2.4 • Published 4 years ago

@azimutlabs/next-config v0.2.4

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

@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
});

LICENSE