-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fea: switching tsm to ts-node in packagejson #6877
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4377c65 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
just out of curiosity, what's the problem with TSM? was thinking that it looked promising for some of our other projects |
”because tsm doesn't support its import map.“ this can answer your question ? |
@wmertens I tested |
commit: |
@wmertens I don't how to fix it, and other it looks greet |
@@ -187,35 +190,35 @@ | |||
}, | |||
"private": true, | |||
"scripts": { | |||
"api.update": "tsm scripts/index.ts --tsc --api --dev", | |||
"build": "tsm scripts/index.ts", | |||
"api.update": "node --loader ts-node/esm --require ./scripts/runBefore.ts scripts/index.ts --tsc --api --dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --loader
flag is discouraged in favor of --import
and will likely be removed in a future. Are you sure this is the right one? Also ts-node does not work with the --import flag. See: TypeStrong/ts-node#1909
I suggest to consider these other options instead:
- tsimp - uses tsc + caching;
- tsx - uses esbuild;
- Anything Node.js itself has to offer:
--experimental-strip-types
or--experimental-transform-types
flag, but they are available since Node v22 end they are experimental;
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
#6856
What is it?
Description
Checklist:
pnpm change
and documented my changes