diff --git a/examples/with-reasonml/.gitignore b/examples/with-reasonml/.gitignore index 9d8f0bbe..019f854e 100644 --- a/examples/with-reasonml/.gitignore +++ b/examples/with-reasonml/.gitignore @@ -1,3 +1,4 @@ bs .merlin lib/ +*.bs.js diff --git a/examples/with-reasonml/bsconfig.json b/examples/with-reasonml/bsconfig.json index 30030a72..66af7686 100644 --- a/examples/with-reasonml/bsconfig.json +++ b/examples/with-reasonml/bsconfig.json @@ -3,7 +3,11 @@ "sources": ["components", "pages"], "bs-dependencies": ["reason-react", "bs-next"], "reason": { "react-jsx": 2 }, - "package-specs": ["commonjs"], + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "suffix": ".bs.js", "bsc-flags": [ "-bs-super-errors" ], diff --git a/examples/with-reasonml/next.config.js b/examples/with-reasonml/next.config.js new file mode 100644 index 00000000..36556760 --- /dev/null +++ b/examples/with-reasonml/next.config.js @@ -0,0 +1,3 @@ +module.exports = { + pageExtensions: ['jsx', 'js', 'bs.js'] +} diff --git a/examples/with-reasonml/package.json b/examples/with-reasonml/package.json index d28cf361..4d5b35a9 100644 --- a/examples/with-reasonml/package.json +++ b/examples/with-reasonml/package.json @@ -2,9 +2,9 @@ "name": "with-reasonml", "version": "1.0.0", "scripts": { - "dev": "bsb -clean-world -make-world && next dev lib/js", - "build": "bsb -clean-world -make-world && next build lib/js", - "start": "next start lib/js" + "dev": "concurrently \"bsb -clean-world -make-world -w\" \"next dev\"", + "build": "bsb -clean-world -make-world && next build", + "start": "next start" }, "license": "ISC", "dependencies": {