1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

with-reasonml: better setup (#4218)

With this setup we're compiling the .re/.ml files directly to source
directories with a .bs.js extension, and enabling next.js to pick up
that extension for pages.
This commit is contained in:
Tony Kovanen 2018-04-27 22:24:46 +07:00 committed by Tim Neutkens
parent f378448b79
commit 6158243339
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,4 @@
bs
.merlin
lib/
*.bs.js

View file

@ -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"
],

View file

@ -0,0 +1,3 @@
module.exports = {
pageExtensions: ['jsx', 'js', 'bs.js']
}

View file

@ -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": {