Skip to content

Commit 09ba5ee

Browse files
authored
Supported rescript 12 with Next.js (#118)
Supported rescript 12 rescript.json with next.js configuration
1 parent c041c22 commit 09ba5ee

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

templates/rescript-template-nextjs/next.config.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import fs from "fs";
22
import path from "path";
33

44
const rescript = JSON.parse(fs.readFileSync("./rescript.json"));
5-
const transpileModules = ["rescript"].concat(rescript["bs-dependencies"]);
5+
6+
const transpilePackages = ["rescript"]
7+
.concat(rescript["bs-dependencies"] ?? [])
8+
.concat(rescript["dependencies"] ?? []);
69

710
const config = {
811
pageExtensions: ["jsx", "js"],
@@ -44,6 +47,6 @@ const config = {
4447
};
4548

4649
export default {
47-
transpilePackages: transpileModules,
50+
transpilePackages,
4851
...config,
4952
};

0 commit comments

Comments
 (0)