diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json index 8bd182fbb9..f761f2b501 100644 --- a/examples/react/start-bare/package.json +++ b/examples/react/start-bare/package.json @@ -8,6 +8,9 @@ "build": "vite build && tsc --noEmit", "start": "vite start" }, + "imports": { + "#*": "./src/*" + }, "dependencies": { "@tanstack/react-router": "^1.131.5", "@tanstack/react-router-devtools": "^1.131.5", diff --git a/examples/react/start-bare/src/routes/__root.tsx b/examples/react/start-bare/src/routes/__root.tsx index 4b83d392e9..bfa750c841 100644 --- a/examples/react/start-bare/src/routes/__root.tsx +++ b/examples/react/start-bare/src/routes/__root.tsx @@ -8,7 +8,7 @@ import { Scripts, createRootRoute, } from '@tanstack/react-router' -import appCss from '~/styles/app.css?url' +import appCss from '#styles/app.css?url' export const Route = createRootRoute({ head: () => ({ diff --git a/examples/react/start-bare/src/routes/about.tsx b/examples/react/start-bare/src/routes/about.tsx index 95a5fe4b86..3564aeaf3b 100644 --- a/examples/react/start-bare/src/routes/about.tsx +++ b/examples/react/start-bare/src/routes/about.tsx @@ -1,5 +1,5 @@ +import Counter from '#components/Counter.js' import { createFileRoute } from '@tanstack/react-router' -import Counter from '~/components/Counter' export const Route = createFileRoute('/about')({ component: RouteComponent, diff --git a/examples/react/start-bare/tsconfig.json b/examples/react/start-bare/tsconfig.json index b3a2d67dfa..79687320db 100644 --- a/examples/react/start-bare/tsconfig.json +++ b/examples/react/start-bare/tsconfig.json @@ -14,9 +14,6 @@ "allowJs": true, "forceConsistentCasingInFileNames": true, "baseUrl": ".", - "paths": { - "~/*": ["./src/*"] - }, "noEmit": true } }