Open chipndahla opened 6 months ago
I don't have access to a Tizen 6 device, so i'm speculating here:
Try if a hosted works or if adding --add "es6-module"
to tvkit fixes it.
Did some more investigations.
First, to my best knowledge the Tizen TV doesn't have an internal webserver, instead it accesses the assets through file:/// which is not normally allowed but Tizen launches Chromium with --allow-file-access-from-files (and a number of other special parameters)
Example how Tizen loads a file (notice the file:///)
Since no webserver can set the MIME types, at least in M76, Chromium refuses to load the JS modules. Will try to verify now
And already uses --add "es6-module" as per a previous chat (a very useful feature! thanks!)
Update I installed old Chrome versions om my dev machine and started it with same params as Tizen does. Could repeat the results!
On M63 (Tizen 5) file:/// are loaded but no MIME type is assigned but no strict MIME-type is required either.
On M76 (Tizen 6) js files are loaded in the same way but console shows lots of MIME warnings:
Console:
On a modern M120 MIME-types headers seem to be automatically added:
So this is clearly an issue with chrome versions around M76.
Will now see if I can work around the issue by assigning MIME-types in javascript
Have now experimented further and despite all the console errors my application seem to work fine (the original errors I had instead seem to come from a Firestore issue on Tizen). Still seem very odd to me that to show a
and then anyhow seem to load the module.
One possible work around would be to either set the MIME-type manually while importing them. Is that possible in Rollup or Babel? Alternatively storing them online and then get the expected MIME-headers from the server.
Any ideas? And thanks for taking the time
We're using TVkit to transpile our code to older Tizen models. This works very well in general so big thanks. But have an odd issue with Tizen 6 (M76) I use TVkit to transpile to Tizen 5 and that works for both Tizen 5 and Tizen 6.5, but oddly not on a Tizen 6. Also tried to target Tizen 6 with Tvkit but still no success.
In the console I get many of these errors while loading different javascript files:
"Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec."
Any ideas why?