Template: add rewriteRelativeImportExtensions to tsconfig.node.json
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript, vite
- Domain
- build-system
Research direction
The change is a one-line addition to Coalesce.Starter.Vue.Web/tsconfig.node.json, where rewriteRelativeImportExtensions should sit beside the existing compiler options. Check that the root tsconfig.json still type-checks with vue-tsc and that the vite.config.ts import of ./build/vitepress-docs resolves without a warning. Done when the TS6310 error no longer appears and the config loads under configLoader: 'native'.
Written by the indexing model from the issue text.
Description
Vite warns that a relative import without a file extension in vite.config.ts won't load under configLoader: 'native', which is planned to become the default in a future major:
(!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, ...
- import "./build/vitepress-docs" without a file extension (vite.config.ts:14:31). Add the file extension
The fix is to write ./build/vitepress-docs.ts. To type-check that import, tsconfig.node.json needs either allowImportingTsExtensions or rewriteRelativeImportExtensions. allowImportingTsExtensions requires noEmit, and because the root tsconfig.json references tsconfig.node.json with composite: true, that fails vue-tsc with TS6310 ("Referenced project ... may not disable emit"). rewriteRelativeImportExtensions: true has no such requirement.
The template's vite.config.ts has no relative imports today, but the first one a project adds runs into this. Adding "rewriteRelativeImportExtensions": true to Coalesce.Starter.Vue.Web/tsconfig.node.json would let projects follow Vite's advice without hitting TS6310.
- Dominant language
- C#
- Stars
- 81
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntelliTect/Coalesce
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
IntelliTect/Coalesce#794 · 1 comment ·
-
Difficulty 2/5 Under an hour Newbie friendliness 85/100
IntelliTect/Coalesce#774 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
IntelliTect/Coalesce#773 ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
IntelliTect/Coalesce#799 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
IntelliTect/Coalesce#798 ·
All issues in IntelliTect/Coalesce
Similar issues
-
:watch: Not Triaged dotnet-target-version
Difficulty 1/5 Under an hour Newbie friendliness 84/100
dotnet/docs-desktop#2313 ·
Maintainers usually reply within 4 days
-
dotnet-target-version
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
:watch: Not Triaged dotnet-target-version
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
Project dependencies are outdatedPossibly taken @yasmoradi claimed this today. Opendependencies
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
bitfoundation/bitplatform#15562 ·
Maintainers usually reply within 1 day
-
bug priority:low severity:S3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
squid-farm/talewright#909 ·
Maintainers usually reply within 1 day