diff --git a/examples/kanban/package.json b/examples/kanban/package.json index 7808738..7c71b05 100644 --- a/examples/kanban/package.json +++ b/examples/kanban/package.json @@ -10,12 +10,16 @@ }, "devDependencies": { "typescript": "~5.8.3", - "vite": "^6.3.5", - "vite-tsconfig-paths": "^5.1.4" + "vite": "^6.3.5" }, "dependencies": { "@tombl/router": "npm:@jsr/tombl__router@^0.1.2", "dhtml": "file:../../dist", "sqlocal": "^0.14.1" + }, + "imports": { + "#app": "./src/app.ts", + "#db": "./src/db/index.ts", + "#util/*": "./src/util/*" } } diff --git a/examples/kanban/src/db/boards.ts b/examples/kanban/src/db/boards.ts index 012d51a..b42c6b4 100644 --- a/examples/kanban/src/db/boards.ts +++ b/examples/kanban/src/db/boards.ts @@ -1,4 +1,4 @@ -import type { App } from '~/app' +import type { App } from '#app' import type { Board, ID } from '.' import { unwrap } from './database' diff --git a/examples/kanban/src/db/cards.ts b/examples/kanban/src/db/cards.ts index c142ef0..ece3d67 100644 --- a/examples/kanban/src/db/cards.ts +++ b/examples/kanban/src/db/cards.ts @@ -1,4 +1,4 @@ -import type { App } from '~/app.ts' +import type { App } from '#app' import { unwrap } from './database.ts' import type { Card, ID } from './index.ts' diff --git a/examples/kanban/src/db/columns.ts b/examples/kanban/src/db/columns.ts index d884fd1..e48886e 100644 --- a/examples/kanban/src/db/columns.ts +++ b/examples/kanban/src/db/columns.ts @@ -1,4 +1,4 @@ -import type { App } from '~/app.ts' +import type { App } from '#app' import { unwrap } from './database.ts' import type { Column, ID } from './index.ts' diff --git a/examples/kanban/src/pages/board/board.ts b/examples/kanban/src/pages/board/board.ts index 95e1563..61a5949 100644 --- a/examples/kanban/src/pages/board/board.ts +++ b/examples/kanban/src/pages/board/board.ts @@ -1,8 +1,8 @@ +import type { App } from '#app' +import * as db from '#db' +import { type Query, createSubscribedQuery } from '#util/query.ts' +import { createRecycler } from '#util/recycle.ts' import { html } from 'dhtml' -import type { App } from '~/app' -import * as db from '~/db' -import { type Query, createSubscribedQuery } from '~/util/query' -import { createRecycler } from '~/util/recycle' import { Column } from './column' import { text } from './text' diff --git a/examples/kanban/src/pages/board/card.ts b/examples/kanban/src/pages/board/card.ts index f43a59a..bbe6c55 100644 --- a/examples/kanban/src/pages/board/card.ts +++ b/examples/kanban/src/pages/board/card.ts @@ -1,7 +1,7 @@ +import type { App } from '#app' +import * as db from '#db' +import { type Query, createSubscribedQuery } from '#util/query.ts' import { html } from 'dhtml' -import type { App } from '~/app' -import * as db from '~/db' -import { type Query, createSubscribedQuery } from '~/util/query' import { text } from './text' export class Card { diff --git a/examples/kanban/src/pages/board/column.ts b/examples/kanban/src/pages/board/column.ts index 5f97b5c..92f653c 100644 --- a/examples/kanban/src/pages/board/column.ts +++ b/examples/kanban/src/pages/board/column.ts @@ -1,8 +1,8 @@ +import type { App } from '#app' +import * as db from '#db' +import { type Query, createSubscribedQuery } from '#util/query.ts' +import { createRecycler } from '#util/recycle.ts' import { html } from 'dhtml' -import type { App } from '~/app' -import * as db from '~/db' -import { type Query, createSubscribedQuery } from '~/util/query' -import { createRecycler } from '~/util/recycle' import { Card } from './card' import { text } from './text' diff --git a/examples/kanban/src/pages/board/index.ts b/examples/kanban/src/pages/board/index.ts index cdfda87..57e55e2 100644 --- a/examples/kanban/src/pages/board/index.ts +++ b/examples/kanban/src/pages/board/index.ts @@ -1,5 +1,5 @@ -import type { PageContext } from '~/app' -import type { ID } from '~/db' +import type { PageContext } from '#app' +import type { ID } from '#db' import { Board } from './board' export default function Page(context: PageContext, params: { id: string }) { diff --git a/examples/kanban/src/pages/index.ts b/examples/kanban/src/pages/index.ts index 14f7a42..1a2a795 100644 --- a/examples/kanban/src/pages/index.ts +++ b/examples/kanban/src/pages/index.ts @@ -1,7 +1,7 @@ +import type { App, PageContext } from '#app' +import * as db from '#db' +import { type Query, createSubscribedQuery } from '#util/query.ts' import { html } from 'dhtml' -import type { App, PageContext } from '~/app' -import * as db from '~/db' -import { type Query, createSubscribedQuery } from '~/util/query' export default class Page { #app: App diff --git a/examples/kanban/src/util/recycle.ts b/examples/kanban/src/util/recycle.ts index 9911c9f..eb26942 100644 --- a/examples/kanban/src/util/recycle.ts +++ b/examples/kanban/src/util/recycle.ts @@ -1,4 +1,4 @@ -import type { ID } from '~/db' +import type { ID } from '#db' export function createRecycler(list: () => Promise>, construct: (id: ID) => T) { return async (prev: T[] | null) => { diff --git a/examples/kanban/tsconfig.json b/examples/kanban/tsconfig.json index 3af6956..c15ccfd 100644 --- a/examples/kanban/tsconfig.json +++ b/examples/kanban/tsconfig.json @@ -19,11 +19,7 @@ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noUncheckedSideEffectImports": true, - - "paths": { - "~/*": ["./src/*"] - } + "noUncheckedSideEffectImports": true }, "include": ["src"] } diff --git a/examples/kanban/vite.config.js b/examples/kanban/vite.config.js index 6c86688..b0fd403 100644 --- a/examples/kanban/vite.config.js +++ b/examples/kanban/vite.config.js @@ -1,5 +1,4 @@ import { defineConfig } from 'vite' -import tsconfigPaths from 'vite-tsconfig-paths' export default defineConfig({ base: './', @@ -9,7 +8,6 @@ export default defineConfig({ esbuild: { target: 'es2024' }, worker: { format: 'es' }, plugins: [ - tsconfigPaths(), { name: 'configure-response-headers', configureServer: server => { diff --git a/package-lock.json b/package-lock.json index 695dfa8..7c52118 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,8 +29,7 @@ }, "devDependencies": { "typescript": "~5.8.3", - "vite": "^6.3.5", - "vite-tsconfig-paths": "^5.1.4" + "vite": "^6.3.5" } }, "examples/kanban/node_modules/dhtml": { @@ -1243,11 +1242,6 @@ "node": ">= 14" } }, - "node_modules/globrex": { - "version": "0.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/has-flag": { "version": "4.0.0", "license": "MIT", @@ -2043,25 +2037,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/tsconfck": { - "version": "3.1.6", - "dev": true, - "license": "MIT", - "bin": { - "tsconfck": "bin/tsconfck.js" - }, - "engines": { - "node": "^18 || >=20" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/tslib": { "version": "2.8.1", "license": "0BSD" @@ -2160,24 +2135,6 @@ } } }, - "node_modules/vite-tsconfig-paths": { - "version": "5.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.1", - "globrex": "^0.1.2", - "tsconfck": "^3.0.3" - }, - "peerDependencies": { - "vite": "*" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, "node_modules/vite/node_modules/fdir": { "version": "6.4.6", "dev": true,