Skip to content

hmr style tag no support in html  #7952

Closed

Description

@usercao

Describe the bug

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". 
Strict MIME type checking is enforced for module scripts per HTML spec.

image

Additional context
https://github.com/usercao/ice-test/blob/main/public/index.html#L15

Here's there repo
https://github.com/usercao/ice-test

Relevance problem: #7136

Reproduction

https://github.com/usercao/ice-test

System Info

System:
    OS: macOS 12.3.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 2.15 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
Binaries:
    Node: 16.14.2 - /usr/local/opt/node@16/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 8.5.0 - /usr/local/opt/node@16/bin/npm
Browsers:
    Chrome: 101.0.4951.41
    Safari: 15.4

Used Package Manager

yarn

Logs

No response

Validations

Activity

  1. sapphi-red commented on Apr 29, 2022

    @sapphi-red
    Member

    Minimal reproduction: https://stackblitz.com/edit/vitejs-vite-cwxjw2?file=index.html

    Also I confirmed #7869 will fix this.

  2. added
    p2-edge-case
    and removed on Apr 29, 2022
  3. locked and limited conversation to collaborators on May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-edge-case

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions