馃悰 bug report
Rebuild on file change doesn't work with Reason, except for the main file in the script tag.
bsconfig.json
{
"name": "example",
"bs-dependencies": [],
"bsc-flags": ["-bs-super-errors"],
"package-specs": {
"in-source": true,
"module": "commonjs"
},
"reason": {
"react-jsx": 2
},
"refmt": 3,
"sources": {
"dir": "src",
"subdirs": true
},
"suffix": ".bs.js",
"warnings": {
"error": "+101"
}
}
parcel --open public/index.html
Changing any .re file that is used in the project triggers a rebuild.
Nothing happens when a .re file that is not directly included from the html is changed.
https://github.com/aeons/parcel-example
Run yarn and yarn start.
Changing something in ./src/index.re triggers a rebuild and reload. Doing the same in ./src/OtherModule.redoes not.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.6.2
| Node | 9.7.0
| npm/Yarn | yarn 1.5.1
| Operating System | macOS 10.13.3
CC @rrdelaney
Oh man, there's actually a reason (heh) this happens. How Reason support works in Parcel is it basically requires the corresponding .bs.js file instead of the Reason file. The problem is all .bs.js files require other .bs.js files, not the .re files. This means the dependency graph looks like one .re file and a bunch of .bs.js files. We need a way to mark the .re files as contextual dependencies.
One quick (and ugly ?) trick is to first launch bsb in watch mode (in an other terminal or in the background) and then start parcel:
(bsb -w &) && parcel index.html
Same issue here, it watches the entry point but not any other files :/
Does anyone have the time to make a reproduction of this and validate that it's still an issue with the latest release of parcel@next?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.
Most helpful comment
Oh man, there's actually a reason (heh) this happens. How Reason support works in Parcel is it basically requires the corresponding
.bs.jsfile instead of the Reason file. The problem is all.bs.jsfiles require other.bs.jsfiles, not the.refiles. This means the dependency graph looks like one.refile and a bunch of.bs.jsfiles. We need a way to mark the.refiles as contextual dependencies.