Next.js
An essential plugin for Next.js, ensuring that all Plaiceholder functions start in the main thread.
Installation​
Add the package alongside your existing
plaiceholder
installation:- npm
- Yarn
npm install @plaiceholder/next
yarn add @plaiceholder/next
Wrap your Next.js config with
withPlaiceholder
:next.config.jsconst { withPlaiceholder } = require("@plaiceholder/next");
module.exports = withPlaiceholder({
// your Next.js config
});
Usage​
…and that's it! Use Next.js and plaiceholder as you would expect.