Skip to content

Add Remix, React Router, TanStack, Expo Router, Hono + bundler-config aliases - #114

Merged
itsflaid merged 1 commit into
mainfrom
js-ts-frameworks
Oct 21, 2026
Merged

itsflaid merged 1 commit into
mainfrom
js-ts-frameworks

Conversation

@itsflaid

Copy link
Copy Markdown
Owner

Ringkasan

Lanjutan fokus JS/TS: framework yang sebelumnya terbaca "react"/"unknown" dengan 0 route sekarang terdeteksi dan di-map, plus alias yang hanya ada di config bundler ikut dibaca.

Framework + route baru

Framework Yang dibaca
Remix flat routes v2 (notes.$id, _auth.login, posts_.$id, ($lang), $ splat, [.]), folder routes, remix-flat-routes; modul tanpa default export = resource route (loader → GET, action → POST)
React Router v7 app/routes.ts dibaca dari AST: route/index/layout/prefix, nesting, spread, array di variabel, flatRoutes()
TanStack Router / Start id dari createFileRoute('/…') (bukan dari nama file), pathless/(group)/_ trailing, .lazy, routeTree.gen.ts diabaikan; server.handlers Start → API route + method
Expo Router app/ / src/app/ / root di app.json, (group), [id], +api, _layout bukan screen, about.web.tsx = screen yang sama
Hono new Hono() chain, basePath, route() lintas file, on, param :id{regex}, @hono/zod-openapi

Detector baru mencari proyeknya sendiri, jadi monorepo sekarang dapat route semua frontend (bukan cuma pemenang slot frontend tunggal).

Alias dari config bundler

resolve.alias (Vite/Vitest/webpack/Rollup, Astro lewat vite), kit.alias (svelte.config), alias (nuxt.config), config.resolve.alias[...] = (hook webpack next.config). Dibaca dari AST, tidak dieksekusi; bentuk object dan [{ find, replacement }]; nilai dilipat dari path.resolve(__dirname, …), fileURLToPath(new URL(…)), template string, konstanta. Nilai yang tidak bisa dihitung (env var, helper asing) dilewati. Scoped per folder config, optional, dan tsconfig tetap menang.

Lain-lain

  • Entry points: app/routes.ts, route module Remix/RR, TanStack __root/router, Expo _layout; file generated (*.gen.ts) tidak dihitung sebagai importer.
  • Fix: folder route Remix (app/routes/blog/route.tsx) tidak lagi dikira Next route handler.
  • Helper route bersama dipindah ke routeUtils.ts.

Sebelum → sesudah (repo contoh nyata)

Repo Sebelum Sesudah
remix indie-stack react/unknown, 0 route remix, 8 route (2 API)
react-router template react, 0 route react-router, / + entry app/routes.ts
TanStack Start basic react, 0 route tanstack-start, 13 route (3 API), entry __root, router.tsx
TanStack Router basic-file-based react, 0 route tanstack-router, 6 route
Hono basic / blog / jsx-ssr / stytch-auth 0 route 14 / 4 / 2 / 3 route (prefix mount lintas file benar)
Hono + Next (pages/api) Next saja /api/hello POST ikut terbaca
create-t3-turbo (Next + Expo + TanStack Start) 3 route 8 route dari ketiga app

Repo non-terkait (commerce, elk) hasilnya identik dengan sebelum perubahan.

Test

  • 23 test baru di test/js-ts-frameworks.test.ts (deteksi, tiap framework, monorepo, alias bundler); total 379 lulus
  • tsc --noEmit, build:cli, build:web, test:package-e2e lulus

Batasan (didokumentasikan di CLAUDE.md)

Hono yang dibuat lewat fungsi factory, TanStack code-based routing, dan createBrowserRouter React Router belum diikuti. Alias Jest moduleNameMapper/Parcel belum dibaca.


Generated by Claude Code

… aliases

Frameworks
- Detect Remix, React Router v7 (framework mode), TanStack Router/Start,
  Expo Router and Hono; the meta-frameworks rank above plain react
- Route detectors for each: Remix flat/folder routes, React Router
  app/routes.ts from the syntax tree, TanStack file routes (ids + server
  handlers), Expo app/ (groups, +api), Hono (chains, basePath, route() across
  files, on, zod-openapi)
- The new detectors find their own projects, so a monorepo lists routes for
  every frontend instead of only the framework that won the slot
- Shared route helpers moved to routeUtils.ts
- Remix route folders (app/routes/x/route.tsx) are no longer mistaken for
  Next route handlers

Graph
- Aliases declared only in bundler config (Vite/Vitest/webpack/Rollup/Astro,
  svelte.config kit.alias, nuxt.config alias, next.config webpack hook) are
  read from the syntax tree and scoped to their directory
- Entry points: React Router/Remix routes, TanStack __root/router, Expo
  _layout; generated files (*.gen.ts) no longer count as importers

Tests: 23 new in js-ts-frameworks.test.ts (379 total). Docs, README,
CLAUDE.md and CHANGELOG updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019HJc4sv9pSLh7vhduSUxBE
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
devmap-web Ready Ready Preview Oct 21, 2026 6:38am UTC

@github-actions

Copy link
Copy Markdown

✅ Welcome ke DevMap!

Terima kasih sudah buat PR. Pastikan checklist ini terpenuhi sebelum review:

  • devmap doctor lolos (tanpa error)
  • Test pnpm test:cli lolos (semua pass)
  • New commands diupdate di docs/commands.md
  • Tidak ada console.log di command files
  • Registry terms sesuai standar (baca docs/guide/05-signal-registry.md)
  • Code style match dengan CONTRIBUTING.md

CI akan jalan otomatis pada setiap update. Kalau gagal, akan muncul link run di komentar ini.

Kalau DevMap membantu, tolong star ya: https://github.com/itsflaid/devmap

Terima kasih kontribusinya! 🙏

@itsflaid
itsflaid merged commit 1b54329 into main Oct 21, 2026
3 checks passed
@itsflaid
itsflaid deleted the js-ts-frameworks branch October 21, 2026 06:39
@itsflaid itsflaid mentioned this pull request Oct 21, 2026

This branch was successfully deployed

1 active deployment
Preview — f0cfd6b7 Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants