Skip to content

Commit 83c910c

Browse files
authored
feat: restrict path aliases to app and test folders (#730)
1 parent 69b4288 commit 83c910c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com/)",
88
"type": "module",
99
"imports": {
10-
"#*": "./*"
10+
"#app/*": "./app/*",
11+
"#tests/*": "./tests/*"
1112
},
1213
"scripts": {
1314
"build": "run-s build:*",

server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async function getBuild() {
201201
? viteDevServer.ssrLoadModule('virtual:remix/server-build')
202202
: // @ts-ignore this should exist before running the server
203203
// but it may not exist just yet.
204-
await import('#build/server/index.js')
204+
await import('../build/server/index.js')
205205
// not sure how to make this happy 🤷‍♂️
206206
return build as unknown as ServerBuild
207207
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"allowJs": true,
1515
"forceConsistentCasingInFileNames": true,
1616
"paths": {
17-
"#*": ["./*"],
17+
"#app/*": ["./app/*"],
18+
"#tests/*": ["./tests/*"],
1819
"@/icon-name": [
1920
"./app/components/ui/icons/name.d.ts",
2021
"./types/icon-name.d.ts"

0 commit comments

Comments
 (0)