@@ -0,0 +1,11 @@
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import path from "node:path";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const entry = path.join(root, "dist/client/index.js");
|
||||
const source = await readFile(entry, "utf8");
|
||||
|
||||
if (!source.startsWith('"use client";')) {
|
||||
await writeFile(entry, `"use client";${source}`);
|
||||
}
|
||||
Reference in New Issue
Block a user