提交 61582433 编写于 作者: T Tony Kovanen 提交者: Tim Neutkens

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.
上级 f378448b
......@@ -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"
],
......
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": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册