11ty / 11ty/dev-server

Feature request: Resolve bare module specifiers in JS modules

Open
#113 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
109
Forks
20
Avg merge
1m
Merged PRs (30d)
1

Description

This dev server would be a lot more useful for projects with client-side JS if it could resolve bare module specifiers so that they load correctly in browsers.

It's not too terribly complicated to do this with middleware and a dependency on something like enhanced-resolve. Here's a single-file implementation in my own server framework that could be adopted: https://github.com/justinfagnani/zipadee/blob/main/packages/javascript/src/lib/serve.ts

Contributor guide

No contributing guide indexed for this repository

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 with the referenced implementation in packages/javascript/src/lib/serve.ts, then locate the dev server’s request or middleware entry point. The issue names no repository test; done means bare module specifiers resolve and load correctly in browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.