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:
parent
f378448b79
commit
6158243339
1
examples/with-reasonml/.gitignore
vendored
1
examples/with-reasonml/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
bs
|
||||
.merlin
|
||||
lib/
|
||||
*.bs.js
|
||||
|
|
|
@ -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"
|
||||
],
|
||||
|
|
3
examples/with-reasonml/next.config.js
Normal file
3
examples/with-reasonml/next.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
pageExtensions: ['jsx', 'js', 'bs.js']
|
||||
}
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in a new issue