dwyl / dwyl/decache

Type: module and other esm implications

Open
#51 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
153
Forks
12
PR merge metrics
No merged PRs in 30d

Description

This library is really useful. It's like a missing piece to my REPL setup that allows me to reload code on filesystem events. I recently moved my code to esm using node's new `type: module` field in package.json. I'm also using ts-node which has WIP support for esm code loading.

The issue is that in my setup with latest node and esm, decache apparently doesn't work. Would it help to provide a code sandbox demo? I realize it could very well be ts-node or another piece of the puzzle not working. 🤔

to clarify: I'm also using typescript lol. And instead of `require` I write `import` (kinda obvious but just want to make sure we're on the same page here)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with a minimal reproduction using the package.json type: module field, latest Node, ts-node, and import syntax, then compare the behavior with require-based loading. Confirm whether decache itself fails with ESM or whether ts-node or another part of the setup is responsible; a reproducible sandbox and a clearly identified cause would define done.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.