Support use client/server directives in Vite
$ npm install @natsuneko-laboratory/vite-plugin-next-directives
Add directives()
to your Vite configuration:
// vite.config.ts
import { defineConfig } from "vite";
import { directives } from "@natsuneko-laboratory/vite-plugin-next-directives";
export default defineConfig({
plugins: [...directives()],
});
MIT by @6jz