How to use next-compose-plugins - 5 common examples

To help you get started, we’ve selected a few next-compose-plugins examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hanford / next-offline / tests / next.config.js View on Github external
"dir": "ltr",
  "lang": "en",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    }
  ],
  "start_url": "/",
  "display": "standalone",
  "theme_color": "#ffffff",
  "background_color": "#ffffff"
}

module.exports = withPlugins([
  [withManifest({ manifest })],
  [withOffline, { dontAutoRegisterSw: true }]
])
github caviarjs / caviar / _design / NextBlock.js View on Github external
const createNextWithPlugins = config => config
  ? extend(config).withPlugins
  : withPlugins
github caviarjs / caviar / src / config-loader.js View on Github external
const createNextWithPlugins = config => config
  ? extend(config).withPlugins
  : withPlugins
github atherosai / next-react-graphql-apollo-hooks / next.config.js View on Github external
if (NODE_ENV === 'development') {
      enhancedConfig.devtool = 'cheap-module-source-map';
    }

    enhancedConfig.resolve.extensions = config.resolve.extensions.concat([
      '.ts',
      '.tsx',
    ]);

    return config;
  },
};

const config = withPlugins(
  [
    [
      sass,
      {
        cssModules: true,
        cssLoaderOptions: {
          importLoaders: 1,
          localIdentName: '[local]___[hash:base64:5]',
        },
      },
    ],
    graphql,
    images,
    analyzer,
  ],
  nextConfig,
github rtCamp / wp-decoupled / next.config.js View on Github external
const { withPlugins } = require('next-compose-plugins');
const withOffline = require('next-offline');
const withSass = require( '@zeit/next-sass' );

const workBoxOptions = {
	generateSw: false,
	workboxOpts: {
		swDest: "./service-worker.js",
		swSrc: path.join(__dirname, "./service-worker.js"),
		globPatterns: ['static/**/*'],
		globDirectory: '.'
	}
};

module.exports = withPlugins([
    [withOffline( workBoxOptions ), { dontAutoRegisterSw: true }],
    [withCss(withSass({ target: "serverless" }))],
], {
    target: "serverless"
});

next-compose-plugins

Provides a cleaner API for enabling and configuring plugins for next.js

MIT
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis