Repository navigation
feat(core): load project tsconfig.json - #3757
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@pi0 How does this relate to Node sub path imports defined in package.json? And the alias config in Nitro? package.json: nitro.config.ts And then the tsconfig.json: Do we need all of them? Can we use I've been trying for days to get Sidequest.js working with Nitro and having the import paths all work between Node and Nitro would just be so useful for that type of thing. |
|
@drewbaker subpath imports (by node convention) should start with Tested on playground: "imports": {
"#server/*": "./*"
} |
commit: |
Yeah they do work great, just seems like an overlap of the |
|
It is in the end choice of users nitro v3 is not having any defaults. I do also prefer subpath imports which are more standard than tsconfig pathh… |
|
OK great, good to know. What do you use as the path? |
|
I would love to see |
I think But anyway nitro won't be opinionated on this. All up to projects. |
|
/cc @schiller-manuel (this works alongside |
|
Hey @pi0 , I just checked this. Shouldnt it be import { useSomething } from '~/utils/use-something';instead of: import { useSomething } from '~utils/use-something';Ofc this is up to the user, but from my experience official docs and examples always determine code conventions broadly used. |
|
In starters it is more generic even https://github.com/nitrojs/starter/blob/7e9adcc03658ba4dee99f6030daa699acb8755bf/tsconfig.json#L5 In example i just wanted to show interchangeable #server or ~server alias creation. |
|
Perfect for the starter !! :) |
As many tools already infering options from
tsconfig.json, nitro core can use it too.Using lighweight tsconfck + cache.
TODO: