framework
framework copied to clipboard
Watch data loader creation and file renaming
If you add a new data loader, it should show up live in the preview server. Same if you rename a data loader from data.csv.sh to data.csv.js.
I think this would require a recursive watch on the source root?
To be more specific, I think the OP is describing this error case:
- You try to load a file that doesn’t exist yet (e.g.,
foo.csv
) - You later add a data loader for that file (e.g.,
foo.csv.js
)
Since neither foo.csv
nor foo.csv.js
existed at the time the file was referenced, we’re not able to watch the corresponding file. And since we don’t watch the directory, we won’t notice when you subsequently add a foo.csv.js
. However, the inverse scenario works fine, when you add foo.csv.js
first, and then load foo.csv
. And the workaround here is pretty simple — you just reload the page. But it would be nice to fix, and I think we should consider this a bug in file watching/hot module reloading.