egoist / egoist/tsup

Shim syntax

Open
#1,086 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

Using `shim: true` generate

```js
// ../../node_modules/.pnpm/tsup@8.0.2_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
import { fileURLToPath } from "url";
import path from "path";
var getFilename = () => fileURLToPath(import.meta.url);
var getDirname = () => path.dirname(getFilename());
var __dirname = /* @__PURE__ */ getDirname();
```

But deno complains with syntax `"path"` and required `"node:path"` is there any way to change this ?
`If you want to use a built-in Node module, add a "node:" prefix (ex. "node:path").`

Contributor guide

Open the contributing guide

Research direction

Reproduce the generated output using the `shim: true` entry point and inspect `assets/esm_shims.js` in the generated tsup package path. Confirm how the built-in imports are emitted and verify that the resulting shim is accepted by Deno with the required `node:` prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, node.js, typescript
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.