From c1fd26f6f0bfe936b4fb7d8977ce331b1b495593 Mon Sep 17 00:00:00 2001 From: Raffinate Date: Sun, 1 Mar 2026 21:16:35 +0000 Subject: [PATCH] Supported rescript 12 with Next.js Supported rescript 12 rescript.json with next.js configuration --- templates/rescript-template-nextjs/next.config.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/rescript-template-nextjs/next.config.mjs b/templates/rescript-template-nextjs/next.config.mjs index 2cff4ac..a28ff20 100644 --- a/templates/rescript-template-nextjs/next.config.mjs +++ b/templates/rescript-template-nextjs/next.config.mjs @@ -2,7 +2,10 @@ import fs from "fs"; import path from "path"; const rescript = JSON.parse(fs.readFileSync("./rescript.json")); -const transpileModules = ["rescript"].concat(rescript["bs-dependencies"]); + +const transpilePackages = ["rescript"] + .concat(rescript["bs-dependencies"] ?? []) + .concat(rescript["dependencies"] ?? []); const config = { pageExtensions: ["jsx", "js"], @@ -44,6 +47,6 @@ const config = { }; export default { - transpilePackages: transpileModules, + transpilePackages, ...config, };