Skip to content

[PAY] Drop the .website file extension from the codebase #90616

@roryabraham

Description

@roryabraham

Coming from https://expensify.slack.com/archives/C08CZDJFJ77/p1778736562617309

Proposal: Standardize on .web.* for app-owned web overrides and drop the .website.* extension.

Background

The web build's resolver at webpack.common.ts:402 chains two app-level platform suffixes in priority order — .web.*, then .website.* — before falling back to bare .ts/.tsx. The split is a fossil from the Electron era. When we used to shipped a desktop app, the build distinguished .web.* (React Native library web variants under node_modules), .website.* (overrides applying to both web and desktop), and .desktop.* (desktop-only). The comment on webpack.common.ts:399-401 describes that era. Desktop was removed in commit 44647e3f (Jan 2026), .desktop.* was stripped from the resolver, and web is the only remaining browser target. Despite that, src/ carries 21 .website.* files alongside 14 .web.* files, with new files of both kinds landing as recently as March 2026 and no documented rule for picking between them.

Problem

New web-only files land under either .web.* or .website.* with no rule distinguishing them, leaving the codebase with two interchangeable suffixes for one concept.

Solution

Rename every *.website.{ts,tsx,js} under src/ to *.web.{ts,tsx,js}, collapse the extensions array on webpack.common.ts:402 to ['.web.js', '.js', '.jsx', '.web.ts', '.web.tsx', '.ts', '.tsx']. After the rename, .web.* is the canonical suffix for any module needing a web-specific implementation — library or app — and the resolver picks the same files in the same order it does today, so the change is behavior-preserving at runtime.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions