Hi,

I patched the file src/furo/__init__.py, to enforce the attribute
type="module" when the script furo.js is embedded in a web page.
Then the syntax 
   import * as Gumshoe from "./gumshoe-patched.js"
is accepted.

I hope that the release 2023.09.10+dfsg-4 can fix the bug definitely.

Best regards,                   Georges.

On Fri, 19 Jan 2024 14:16:31 +0100 Raphael Hertzog <hert...@debian.org> wrote:
> Control: reopen -1
> 
> On Fri, 19 Jan 2024, Debian Bug Tracking System wrote:
> >  furo (2023.09.10+dfsg-3) unstable; urgency=medium
> >  .
> >    * included the code from normalize.css into furo.css instead of
> >      the include directive. Closes: #1060897
> 
> Thanks for this fix! Unfortunately, this only solves one of the two
> problems that I reported in #1060897 (I know that I should have opened two
> bugs...).
> 
> The other one was about the javascript in furo.js failing to execute (at
> least in Firefox in unstable) with this error message:
> 
> Uncaught SyntaxError: import declarations may only appear at top level of a 
> module
> 
> As I said in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060897#10
> that import statement is not present in a regular furo.js as built
> by the upstream build system because the file is post-processed and
> minified. Ex here:
> https://pradyunsg.me/furo/_static/scripts/furo.js
> 
> So I assume we need to post-process the file in some similar way to get it
> to work or tweak the way we import the code to allow the import statement
> to work but I'm not a big fan of diverting too much from upstream and we
> are doing this a lot here (but it's often unavoidable with all packages
> relying on the node ecosystem in some way). :-(
> 
> Cheers,
> -- 
>   ⢀⣴⠾⠻⢶⣦⠀   Raphaël Hertzog <hert...@debian.org>
>   ⣾⠁⢠⠒⠀⣿⡁
>   ⢿⡄⠘⠷⠚⠋    The Debian Handbook: https://debian-handbook.info/get/
>   ⠈⠳⣄⠀⠀⠀⠀   Debian Long Term Support: https://deb.li/LTS
> 
> 

-- 
Georges KHAZNADAR et Jocelyne FOURNIER
22 rue des mouettes, 59240 Dunkerque France.
Téléphone +33 (0)3 28 29 17 70

Attachment: signature.asc
Description: PGP signature

Reply via email to