Skip to content

fix(docker): serve .mjs modules as javascript#64

Merged
github-actions[bot] merged 1 commit into
devfrom
fix/docker-mjs-mime
Jun 17, 2026
Merged

fix(docker): serve .mjs modules as javascript#64
github-actions[bot] merged 1 commit into
devfrom
fix/docker-mjs-mime

Conversation

@Ryback2501

Copy link
Copy Markdown
Owner

Summary

  • Fix the SPA being completely non-functional when served from the Docker image: nginx served .mjs ES modules as application/octet-stream, so browsers refused to execute them, the vendor crypto imports failed, and app.js never initialized (every button, including "Generate new key pair", was dead).

Changes

Container

  • Dockerfile — register .mjs as application/javascript in nginx's mime.types (it has no .mjs entry by default). All vendor/*.mjs files now serve with a JavaScript content type.

CI

  • .github/workflows/ci-jobs.yml — add a docker-smoke step that fetches vendor/secp256k1.mjs and asserts its Content-Type is JavaScript, so this regression can't recur.

Test plan

  • Build the image and confirm curl -I .../vendor/secp256k1.mjs returns Content-Type: application/javascript.
  • Load the app from the container in a browser, click "Generate new key pair", and confirm a key pair is created (no module errors in the console).

@github-actions github-actions Bot merged commit 10f2b18 into dev Jun 17, 2026
10 checks passed
@github-actions github-actions Bot deleted the fix/docker-mjs-mime branch June 17, 2026 14:24
This was referenced Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant