framework
framework copied to clipboard
case sensitive file names
Preview is (most often?) case insensitive, but hosting can be case sensitive. A file attachment named AAPL.csv might be correctly resolved in preview and build, but fail in production.
I'd suggest we make preview and build case sensitive, ~~or (maybe better) we lowercase all filenames.~~
I think this is your operating system (macOS) being case insensitive rather than preview and I don’t think we should do anything here. Forcing all files to be lowercase would likely cause other problems.
True, forcing all files to be lowercase is a bad idea (we don't want to have to rewrite scripts that expect to load a file called SoMeThInG.js).
I still think preview (or, and more importantly, build) should help the user catch the issue and break—rather than discovering it in production.
This might mean that we need to compare the list of actual file names ([aapl.csv] in this case) with the list of expected file names ([AAPL.csv])? Needs a bit of investigation.
Yeah we could do some validation during build since we have the full list of files then, and warn if the file cases don’t match what the operating system says when you readdir recursive.