Skip to content

Commit

Permalink
fix: generate root/src directory aliases (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 27, 2024
1 parent 38fcbd2 commit 1694850
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,30 @@ declare module 'nitropack' {
"#imports": [
relativeWithDot(tsconfigDir, join(typesDir, "nitro-imports")),
],
"~/*": [
relativeWithDot(
tsconfigDir,
join(nitro.options.alias["~"] || nitro.options.srcDir, "*")
),
],
"@/*": [
relativeWithDot(
tsconfigDir,
join(nitro.options.alias["@"] || nitro.options.srcDir, "*")
),
],
"~~/*": [
relativeWithDot(
tsconfigDir,
join(nitro.options.alias["~~"] || nitro.options.rootDir, "*")
),
],
"@@/*": [
relativeWithDot(
tsconfigDir,
join(nitro.options.alias["@@"] || nitro.options.rootDir, "*")
),
],
...(nitro.options.typescript.internalPaths
? {
"#internal/nitro": [
Expand Down

0 comments on commit 1694850

Please sign in to comment.