Skip to content

[bug] Auto-reload / hot-reload / HMR will add autoReload Code to the request return content of the binary file #6997

@itorr

Description

@itorr

Describe the bug

AutoReload code will also be added when requesting binary files

Reproduction

test code

fetch("./model/yuki.moc3");

Response data

image

Expected behavior

Can I choose the extension to load the auto reload code ?

Platform and versions

[✔] Environment
    - OS: Windows 10.0.19044 X64
    ✔ WebView2: 113.0.1774.42
    ✔ MSVC: Visual Studio ���ɹ��� 2022
    ✔ rustc: 1.69.0 (84c898d65 2023-04-16)
    ✔ Cargo: 1.69.0 (6e9a83356 2023-04-12)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.0.0
    - pnpm: 8.5.1
    - npm: 8.6.0

[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.1
    - @tauri-apps/api [NPM]: not installed!
    - @tauri-apps/cli [NPM]: 1.3.0 (outdated, latest: 1.3.1)

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../src
    - devPath: ../src

Stack trace

https://github.com/tauri-apps/tauri/blob/acc36fe1176cc8aa9063bde932abeb94796c5c72/tooling/cli/src/helpers/web_dev_server.rs#LL149C27-L149C27

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions