Pay-then-profile join desk with live card, S3 upload fallback, hydration-safe drafts; document on test9 README. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
737 B
JavaScript
20 lines
737 B
JavaScript
/**
|
|
* Copy MapLibre worker + shared ESM into public/ for Next/Turbopack.
|
|
* Run after upgrading maplibre-gl: `node scripts/sync-maplibre-worker.mjs`
|
|
*/
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { createRequire } from "node:module";
|
|
|
|
const require = createRequire(import.meta.url);
|
|
const pkgDir = path.dirname(require.resolve("maplibre-gl/package.json"));
|
|
const dist = path.join(pkgDir, "dist");
|
|
const outDir = path.resolve("public/maplibre");
|
|
fs.mkdirSync(outDir, { recursive: true });
|
|
for (const name of ["maplibre-gl-worker.mjs", "maplibre-gl-shared.mjs"]) {
|
|
const src = path.join(dist, name);
|
|
const dest = path.join(outDir, name);
|
|
fs.copyFileSync(src, dest);
|
|
console.log("synced", name, "→", dest);
|
|
}
|