Skip to content
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

Exclude tsconfig.json from npm dist #5

Open
FlatMapIO opened this issue Apr 3, 2023 · 3 comments
Open

Exclude tsconfig.json from npm dist #5

FlatMapIO opened this issue Apr 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@FlatMapIO
Copy link

I have been using TypeScript 5.x in a new project and I have noticed that when I press F8 to track errors, VSCode often jumps to the node_modules/oby/tsconfig.json file and prompts me that it cannot find the tsex/tsconfig.json file. This also causes a lot of import statements in the node_modules/oby/src directory to be marked as red errors when I browse through the code. I hope that these tsconfig.json files can be excluded when the npm package is released next time. I also hope that the same setting can be adopted in voby.

@fabiospampinato
Copy link
Member

Do you have skipLibCheck set to false in your tsconfig.json? 🤔

@FlatMapIO
Copy link
Author

Yes, I have noticed this change that occurred in ts 5.0x. This is my tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "moduleResolution": "bundler",
    "module": "ESNext",
    "target": "ESNext",
    "esModuleInterop": true,
    "inlineSources": false,
    "isolatedModules": true,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "resolveJsonModule": true,
    "strict": true,
    "lib": [
      "DOM",
      "DOM.Iterable",
      "ESNext"
    ],
    "jsx": "react-jsx",
    "jsxImportSource": "voby",
    "baseUrl": ".",
    "types": [
      "vitest/globals",
      "vite/client"
    ],
    "paths": {
      "~/*": [
        "./src/*"
      ]
    }
  },
  "include": [
    "src"
  ],
  "exclude": [
    "dist",
    "build",
    "node_modules"
  ]
}

@fabiospampinato
Copy link
Member

fabiospampinato commented Apr 14, 2023

I think we should wait and see if TS fixes this on their end, in the mean time maybe it's worth not upgrading to v5 just yet.

Maybe there's something that could be changed in the way the repository is currently organized, maybe some settings in tsconfig can be tweaked to hide those errors.

@fabiospampinato fabiospampinato added the bug Something isn't working label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants