Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Woff/eot/woff2 files are changing in 1.x #8051

Open
dispalt opened this issue Oct 3, 2024 · 1 comment
Open

[Bug]: Woff/eot/woff2 files are changing in 1.x #8051

dispalt opened this issue Oct 3, 2024 · 1 comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@dispalt
Copy link

dispalt commented Oct 3, 2024

System Info

rspack 1.0.7, 1.0.8

  System:
    OS: Linux 6.10 Fedora Linux 40 (Workstation Edition)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz
    Memory: 5.03 GB / 31.07 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 20.17.0 - /nix/store/w78sh036dyn14f29w8za9ni9syrmwm3q-nodejs-20.17.0/bin/node
    Yarn: 1.22.22 - /nix/store/9yd6frl42syv6vncdy619zblj2vg406g-yarn-1.22.22/bin/yarn
    npm: 10.8.2 - /nix/store/w78sh036dyn14f29w8za9ni9syrmwm3q-nodejs-20.17.0/bin/npm
    bun: 1.1.29 - /nix/store/mqzlk40bnhx54by2m4lyyc02syippzad-bun-1.1.29/bin/bun
  Browsers:
    Chrome: 129.0.6668.89

Details

So after upgrading to 1.x my woff/woff2 files don't load in the browser, but only with a production build. I get an error like the following.

My configuration hasn't changed the relevant lines, I do use less which might be an issue?

        {
          test: /\.(woff|woff2|eot|ttf|otf)$/,
          type: 'asset/resource'
        },
Failed to decode downloaded font: <URL>Understand this warning
dashboard:1 Failed to decode downloaded font: http://localhost:8080/assets/8dd453067a91e02705cb.woff2Understand this warning
dashboard:1 Failed to decode downloaded font: http://localhost:8080/assets/8dd453067a91e02705cb.woff2Understand this warning
dashboard:1 Failed to decode downloaded font: http://localhost:8080/assets/8dd453067a91e02705cb.woff2Understand this warning
dashboard:1 Failed to decode downloaded font: http://localhost:8080/assets/0080cd663905c74833d4.woffUnderstand this warning
dashboard:1 Failed to decode downloaded font: http://localhost:8080/assets/0080cd663905c74833d4.woff

24OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
24OTS parsing error: incorrect file size in WOFF header

The other odd thing is this, the file-size seems to have changed, the manifest is the top section, then the output, then the source files:

❯ cat manifest.json|grep woff2
  "UntitledSansWeb-BoldItalic.woff2": "/assets/df68a2f121e6187b.woff2",
  "UntitledSansWeb-BlackItalic.woff2": "/assets/78bdb797c88c0a01.woff2",
  "UntitledSansWeb-RegularItalic.woff2": "/assets/d382d49119362472.woff2",
  "UntitledSansWeb-MediumItalic.woff2": "/assets/20a88768ac4c6e56.woff2",
  "UntitledSansWeb-Black.woff2": "/assets/77c5b91cda599b81.woff2",
  "UntitledSansWeb-Bold.woff2": "/assets/9049aef195690080.woff2",
  "UntitledSansWeb-Medium.woff2": "/assets/327aac89d6599489.woff2",
  "UntitledSansWeb-Regular.woff2": "/assets/621214399ae2849d.woff2",
  "UntitledSansWeb-LightItalic.woff2": "/assets/beb6c86f707175c0.woff2",
  "UntitledSansWeb-Light.woff2": "/assets/53569d1fdd782522.woff2",

client/target/static on  dan/upgrade-rspack [$✘!] via  v20.17.0 via ❄️  impure (nix-shell-env) on ☁️  (us-west-2) 
❯ ls -al *.woff2
-rw-r--r-- 1 dan dan 64906 Oct  3 12:03 20a88768ac4c6e56.woff2
-rw-r--r-- 1 dan dan 63430 Oct  3 12:03 327aac89d6599489.woff2
-rw-r--r-- 1 dan dan 62171 Oct  3 12:03 53569d1fdd782522.woff2
-rw-r--r-- 1 dan dan 62783 Oct  3 12:03 621214399ae2849d.woff2
-rw-r--r-- 1 dan dan 64592 Oct  3 12:03 77c5b91cda599b81.woff2
-rw-r--r-- 1 dan dan 66262 Oct  3 12:03 78bdb797c88c0a01.woff2
-rw-r--r-- 1 dan dan 64340 Oct  3 12:03 9049aef195690080.woff2
-rw-r--r-- 1 dan dan 63024 Oct  3 12:03 beb6c86f707175c0.woff2
-rw-r--r-- 1 dan dan 64742 Oct  3 12:03 d382d49119362472.woff2
-rw-r--r-- 1 dan dan 66813 Oct  3 12:03 df68a2f121e6187b.woff2

client/target/static on  dan/upgrade-rspack [$✘!] via  v20.17.0 via ❄️  impure (nix-shell-env) on ☁️  (us-west-2) 
❯ ls -al ../../../server/src/main/public/fonts/*.woff2
-rw-r--r-- 1 dan dan 30504 Nov  5  2021 ../../../server/src/main/public/fonts/MaisonNeueExtended-Bold.woff2
-rw-r--r-- 1 dan dan 36578 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-BlackItalic.woff2
-rw-r--r-- 1 dan dan 35750 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-Black.woff2
-rw-r--r-- 1 dan dan 36718 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-BoldItalic.woff2
-rw-r--r-- 1 dan dan 35474 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-Bold.woff2
-rw-r--r-- 1 dan dan 34526 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-LightItalic.woff2
-rw-r--r-- 1 dan dan 34270 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-Light.woff2
-rw-r--r-- 1 dan dan 35770 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-MediumItalic.woff2
-rw-r--r-- 1 dan dan 35022 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-Medium.woff2
-rw-r--r-- 1 dan dan 35790 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-RegularItalic.woff2
-rw-r--r-- 1 dan dan 34714 Nov  5  2021 ../../../server/src/main/public/fonts/UntitledSansWeb-Regular.woff2

Reproduce link

No response

Reproduce Steps

rspack production build with woff/woff2 files included from less

@dispalt dispalt added bug Something isn't working pending triage The issue/PR is currently untouched. labels Oct 3, 2024
@dispalt
Copy link
Author

dispalt commented Oct 3, 2024

And just checking it seems to not be an issue with 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant