Skip to content

Using next-ignite as a Next.js plugin

Most of ignites features can be used as a plain Next.js plugin! 🎉

What you loose:

  • can no longer use .igniterc file

And not much else (we said it was a thin wrapper right 😉)

docs/next.config.js:

const withIgnite = require("next-ignite/next")({
  // your ignite options
});

module.exports = withIgnite();
const withIgnite = require("next-ignite/next")({
  // your ignite options
});

module.exports = withIgnite();

Options

You can config ignite directly from your next.config.js. This is the same configuration present in your .igniterc. When using ignite as a Next.js plugin you config will not be loaded.

To see the available configuration options visit the configuration documentation.

const withIgnite = require("next-ignite/next")({
  basePath: "pages",
});

module.exports = withIgnite();
const withIgnite = require("next-ignite/next")({
  basePath: "pages",
});

module.exports = withIgnite();