fix: correctly configure module and noEmit tsconfig and jsconfig properties - #11029
Conversation
🦋 Changeset detectedLatest commit: 391c8a4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
module NodeNext to tsconfig.json when scaffolding library projectsmodule config in tsconfig.json when scaffolding library projects
module config in tsconfig.json when scaffolding library projectsmodule config to NodeNext in tsconfig.json when scaffolding library projects
This won't help though if you're creating a library using JSDoc, you won't have a |
Based on https://vitejs.dev/guide/features.html#transpile-only and https://www.typescriptlang.org/tsconfig#noEmit it would seem that A bit off-topic: reading Vite's docs about |
|
I've added |
module config to NodeNext in tsconfig.json when scaffolding library projectsmodule: NodeNext and noEmit in tsconfig.json when scaffolding library projects
module: NodeNext and noEmit in tsconfig.json when scaffolding library projectsmodule: NodeNext and noEmit in tsconfig.json when scaffolding projects
|
The generated one means that people updating SvelteKit get the fix, while putting it in |
|
Setting I'm not sure about |
I think it might be needed for TS projects too for whatever reason someone wants to have JS files in their TS project.
EDIT: the generated file seems to be exporting |
|
Yeah it is. While we're at it, I think it makes sense to set |
Is that for all projects or just the library skeleton? |
module: NodeNext and noEmit in tsconfig.json when scaffolding projectsmodule: bundler and noEmit in tsconfig.json when scaffolding projects
Ah, thanks. I missed that. That sounds good to me.
I think libraries should be |
The reason for proposing As of
The |
module: bundler and noEmit in tsconfig.json when scaffolding projectsmodule and noEmit tsconfig and jsconfig properties
fixes #11023
fixes #9552
This PR fixes the errors found in tsconfig.json when scaffolding a typescript library project then running
pnpm check.This one is fixed by providing a index.ts file instead of .js in the example lib folder. EDIT: and adding
noEmitto tsconfigThis one is fixed by adding theEDIT: setting module: bundlermodule: NodeNextto the library project tsconfig.json and jsconfig.json files.Thanks to @hyunbinseo
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.