Skip to content

build: migrate to Vite - #252

Open
Tomahawk2191 wants to merge 10 commits into
isaac/migrate-to-oxlint-oxfmtfrom
isaac/migrate-to-vite
Open

build: migrate to Vite#252
Tomahawk2191 wants to merge 10 commits into
isaac/migrate-to-oxlint-oxfmtfrom
isaac/migrate-to-vite

Conversation

@Tomahawk2191

Copy link
Copy Markdown
Collaborator

What was the ticket?

WT-[ticket number] - [ticket title]

Ticket Link: htttps://put_the_ticket_link_here.com

What did I do?

How did I test it?

Describe in detail steps you used to test the changes you have made.

Required checks:

  • Did you conduct a self-review?
  • Have you written unit or integration tests?

What could go wrong in the future? What parts of your code should the reviewer pay the most attention to?

Describe aspects of the PR that may become problems in the future.

Additional Comments for the Reviewers

Screenshots

FIGMA

alt text

MY VERSION

alt text

Vite only applies the JSX transform to .jsx/.tsx by default, so every
module containing JSX needs the extension. Also updates the explicit
.js import specifiers in ChooseYourCharacter to match.
- swap react-scripts for vite + @vitejs/plugin-react; test runner is
  now vitest
- move public/index.html to the project root and point it at
  /src/index.jsx; drop the %PUBLIC_URL% placeholders
- keep build output in build/ so the existing deploy config still works
- add "type": "module" so vite.config.ts loads as ESM without warning
- drop the CRA-only browserslist config
CRA's `import { ReactComponent as X } from './x.svg'` has no Vite
equivalent; under Vite those bindings resolved to undefined and the
render threw, blanking the page. vite-plugin-svgr provides the same
capability through the ?react suffix.
process.env does not exist in the browser under Vite, so client.js
threw a ReferenceError at module load. Vite exposes env vars through
import.meta.env and only for keys prefixed VITE_, so the keys in .env
are renamed to match.
@fraander

fraander commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

👷 Deploy Preview for sprightly-manatee-243873 processing.

Name Link
🔨 Latest commit e611357
🔍 Latest deploy log https://app.netlify.com/projects/sprightly-manatee-243873/deploys/6a9dbfc6bf7b1e00087c9703

@Tomahawk2191 Tomahawk2191 changed the title isaac/migrate to vite build: migrate to Vite Sep 6, 2026
@Tomahawk2191
Tomahawk2191 marked this pull request as ready for review September 6, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants