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

Content-Type wrong for .data files #409

Closed
stefnotch opened this issue Jun 18, 2020 · 0 comments
Closed

Content-Type wrong for .data files #409

stefnotch opened this issue Jun 18, 2020 · 0 comments

Comments

@stefnotch
Copy link
Contributor

Do NOT ignore this template or your issue will have a very high chance to be closed without comment.

Describe the bug

I have some emscripten compiled files in my public directory. Emscripten generates somename.data files and expects them to have the content type application/octet-stream.

Expected
Content-Type: application/octet-stream
image

Actual
Vite serves it as application/javascript
image

Vite also complains about it in the logs

[vite] failed to parse /public/pyodide/pyodide.asm.data for import rewrite.
If you are using JSX, make sure to named the file with the .jsx extension.

Reproduction

  1. Clone or download https://github.com/stefnotch/quantum-sheet/tree/e5075aad4bf4a14c772e369e7c14c284b202b38b
  2. npm install
  3. npm run download:pyodide to download and unpack pyodide.
  4. npm run dev to start the development server

System Info

  • required vite version: 0.20.8
  • required Operating System: Windows 10
  • required Node version: v14.4.0
  • Optional:
    • npm/yarn version
    • Installed vue version (from yarn.lock or package-lock.json)
    • Installed @vue/compiler-sfc version

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. Provide the error log here.
@stefnotch stefnotch changed the title .data file Content-Type wrong for .data files Jun 18, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant