You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create-rescript-app produces broken configuration for Next.js if rescript 12 is used #117
| What is the name of your new ReScript project?
| resexample
| Select a template
| Next.js
| ReScript version?
| 12.2.0
cd resexample
head -n 30 README.md
...
Development
Run ReScript in dev mode:
npm run res:dev
In another tab, run the Next dev server:
npm run dev
Open 2 terminal tabs and navigate to the project directory
In the first one run: $ npm run res:dev
In the second one run: $ npm run dev
Expected
devserver successfully starts
Actual
⚠ Invalid next.config.mjs options detected:
⚠ "transpilePackages[1]" is missing, expected string
⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config
TypeError: Cannot read properties of undefined (reading 'replace')
at Array.map ()
Root cause
I briefly checked why this is happening.
It seems that in rescript 12 configuration files
removed "bs-" and "bsc-" prefixes
changed the title [-]create-rescript-app does not generate working app for rescript 12[/-][+]create-rescript-app does not generate working app for rescript 12 + Next.js[/+]on Mar 1, 2026
changed the title [-]create-rescript-app does not generate working app for rescript 12 + Next.js[/-][+]create-rescript-app produces broken app for rescript 12 + Next.js[/+]on Mar 1, 2026
changed the title [-]create-rescript-app produces broken app for rescript 12 + Next.js[/-][+]create-rescript-app produces broken configuration for Next.js if rescript 12 is used[/+]on Mar 1, 2026
Activity
[-]create-rescript-app does not generate working app for rescript 12[/-][+]create-rescript-app does not generate working app for rescript 12 + Next.js[/+][-]create-rescript-app does not generate working app for rescript 12 + Next.js[/-][+]create-rescript-app produces broken app for rescript 12 + Next.js[/+][-]create-rescript-app produces broken app for rescript 12 + Next.js[/-][+]create-rescript-app produces broken configuration for Next.js if rescript 12 is used[/+]fhammerschmidt commentedon Mar 2, 2026
Fixed by #118