-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: correctly configure module
and noEmit
tsconfig and jsconfig properties
#11029
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
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 |
packages/create-svelte/shared/+skeletonlib+checkjs/jsconfig.json
Outdated
Show resolved
Hide resolved
The reason for proposing As of
The |
packages/create-svelte/shared/+skeletonlib+typescript/tsconfig.json
Outdated
Show resolved
Hide resolved
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
noEmit
to tsconfigThis one is fixed by adding theEDIT: setting module: bundlermodule: NodeNext
to 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 test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.