Skip to content

[PSA] Sandbox with Typescript 4.5.0-beta and ts-node with nodenext modules #1490

Closed

Description

@FossPrime

Sandbox: https://codesandbox.io/s/ts-http-ygsxh?file=/tsconfig.json

// tsconfig.json
{
  "ts-node": {
    "files": true
  },
  "compilerOptions": {
    "target": "es2021",
    "module": "nodenext",
    "outDir": "/tmp/ts-http",
    "rootDir": "./src",
    "strict": true
  },
  "exclude": [
    "test"
  ]
}
// package.json
"type": "module",
"scripts": {
  "start": "nodemon -x node --loader ts-node/esm src/index.ts"
},
"dependencies": {
  "typescript": "4.5.0-beta",
  "@types/node": "14.14.37",

Though I'd post this somewhere... because it's not just a run ts-node-dev and you're done deal... they are on ts-node version 9, and don't override files/includes by default.

Activity

  1. cspotcode commented on Oct 7, 2021

    @cspotcode
    Collaborator

    What's this for?

  2. FossPrime commented on Oct 7, 2021

    @FossPrime
    Author

    Nothing in particular... I guess anyone trying to upgrade to 4.5.0-beta to avoid module resolution issues and compiler time.

    I added the definition and the untyped module just to make sure tsconfig was getting read properly... And as a playground of the many many ways to break this minimal app. We can close this... I was really hoping someone else had run into 4.5 issues and posted it here.

  3. locked and limited conversation to collaborators on Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions