rust-lang / rust-lang/mdBook

built-in server doesn't set correct mime types for js

Open
#2,267 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

The built-in server command serves js as plain text, which causes modules to fail to import. I'm trying to integrate https://github.com/tabatkins/railroad-diagrams into my book however the mime type needs to be text/javascript.

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the built-in server command and trace how it determines MIME types for JavaScript files. Verify that JavaScript modules are served as text/javascript and that the reported import failure is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust
Domain
cli, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.