Skip to content

Commit

Permalink
style: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Aug 1, 2023
1 parent 993a4e5 commit 8b0663c
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,17 @@ declare module 'nitropack' {
jsxFactory: "h",
jsxFragmentFactory: "Fragment",
paths: {
"#imports": [relativeWithDot(tsconfigDir, join(typesDir, "nitro-imports"))],
"#imports": [
relativeWithDot(tsconfigDir, join(typesDir, "nitro-imports")),
],
...(nitro.options.typescript.internalPaths
? {
"#internal/nitro": [relativeWithDot(tsconfigDir, join(runtimeDir, "index"))],
"#internal/nitro/*": [relativeWithDot(tsconfigDir, join(runtimeDir, "*"))],
"#internal/nitro": [
relativeWithDot(tsconfigDir, join(runtimeDir, "index")),
],
"#internal/nitro/*": [
relativeWithDot(tsconfigDir, join(runtimeDir, "*")),
],

Check warning on line 246 in src/build.ts

View check run for this annotation

Codecov / codecov/patch

src/build.ts#L241-L246

Added lines #L241 - L246 were not covered by tests
}
: {}),
},
Expand Down Expand Up @@ -465,7 +471,7 @@ function formatRollupError(_error: RollupError | OnResolveResult) {
}

const RELATIVE_RE = /^\.{1,2}\//;
function relativeWithDot (from: string, to: string) {
const rel = relative(from, to)
return RELATIVE_RE.test(rel) ? rel : './' + rel
function relativeWithDot(from: string, to: string) {
const rel = relative(from, to);
return RELATIVE_RE.test(rel) ? rel : "./" + rel;
}

0 comments on commit 8b0663c

Please sign in to comment.