-
Notifications
You must be signed in to change notification settings - Fork 389
Description
With the new way quarto.js works, and how in import tabset.js, Quarto will show console error about loading scripts when opening the HTML file, without having resource embeded.
Access to script at '(...)/index_files/libs/quarto-html/quarto.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.
This happens with Quarto 1.6.40 too.
quarto.js:1 Uncaught SyntaxError: Cannot use import statement outside a module
I am opening this issue in case anyone else is searching for this, as this is new starting from Quarto 1.6. Previously, opening from file system would work, but now, Quarto documents needs to be served (using quarto preview for example) so that they fully works. This was previously required only when using some JS tool that required server (like OJS)
I don't known if we can improve this somehow, but at least this should be documented somewhere... maybe in the FAQ. 🤔
This can be surprising to some users.
(I found this while looking at rich-iannone/DiagrammeR#519 (comment) where quarto preview does not work with some JS lib and opening from file system help)

