@dmno/nextjs-integration

0.0.14 • Public • Published

Check out the docs for more information on how to use DMNO + Next.js.

If you have any questions, please reach out to us on Discord.


@dmno/nextjs-integration npm

Provides tooling to integrate dmno into your nextjs app

Installation

# let dmno init do the work for you
npx dmno init
# or do it manually
npm add @dmno/nextjs-integration

Example Usage

Initialize the plugin and use in your next config (next.config.mjs)

import { dmnoNextConfigPlugin } from '@dmno/nextjs-integration';

/** @type {import('next').NextConfig} */
const nextConfig = {
  // rest of user config...
};

export default dmnoNextConfigPlugin()(nextConfig);

Add to your site code

Import the module somewhere that will affect all pages - for example in App.tsx or layout.tsx

import '@dmno/nextjs-integration';

//... the rest of your normal code ...

Add to package.json

{
  "name": "yourapp",
  "scripts": {
    "dev": "dmno run -w -- next dev",
    "build": "dmno run -- next build",
    "start": "dmno run -- next start",
    "lint": "dmno run -- next lint"
  },
  // ...
}

/@dmno/nextjs-integration/

    Package Sidebar

    Install

    npm i @dmno/nextjs-integration

    Weekly Downloads

    13

    Version

    0.0.14

    License

    MIT

    Unpacked Size

    201 kB

    Total Files

    16

    Last publish

    Collaborators

    • theo
    • philmillman