Skip to content

Conversation

@didoesdigital
Copy link
Owner

@didoesdigital didoesdigital commented Nov 2, 2025

This PR closes #251

  • Adds "vite"
  • Adds "vite-plugin-svgr"
  • Adds "vite-tsconfig-paths"
  • Adds "vite-plugin-checker"
  • Removes webpack

This PR also:

  • Adds package.json scripts for linting/lint-fixing, test coverage, vite preview, and type-checking, and splits build script into build:staging and build:production
  • Switches from Jest to Vitest and removes "jest-mock-random"
    • Upgrades Sentry from "@sentry/browser": "^6.17.9" to "@sentry/react": "^10.22.0"
  • Removes "@sentry/cli" and instead uses "@sentry/vite-plugin"
  • Upgrades eslint from "8.23.0" to "8.57.1"
  • Replaces "sass": "^1.49.8" with "sass-embedded": "^1.91.0"
    • Updates Sass syntax using "sass-migrator": "^2.4.2" (but did not save the dependency)
  • Changes tsconfig.json settings like "jsx": "react" to "jsx": "react-jsx", "moduleResolution": "node", to "moduleResolution": "bundler",
  • Adds "@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser" ahead of replacing "eslint-config-react-app"
  • Switches Storybook from webpack to vite
  • Removes "@storybook/preset-create-react-app"
  • Updates "eslint-plugin-storybook" from ^0.6.15 to "0.12.0"
  • Removes "@storybook/node-logger" (unused) and resolutions for "fork-ts-checker-webpack-plugin": "^6.5.3"
  • Updates "@types/node": "^22.15.19"
  • Removes "browserslist" and uses Vite's "baseline-widely-available" build.targetfor JS support
  • Makes widespread code changes (mostly syntax) for Vitest, Sentry, Sass changes
  • Addresses: 3 critical, 12 high, 41 moderate, and 3 low severity vulnerabilities

Mostly unrelated changes:

  • Adds guards against missing flashcard content errors
  • Renames .js diagrams to .jsx
  • Add --itemize-changes to staging/qa deploy rsync steps
  • Change PageNotFound GA/Sentry trigger to location.pathname

To test this PR:

  • Set up the repo (see the README)
  • Check out the branch migrate-off-cra
  • Run yarn to install the changed dependencies
  • Run all the scripts:
    • yarn start and check that Typey Type still works like it should! Lessons and progress especially!
    • yarn test should pass and watch
    • yarn test:unit should pass
    • yarn test:ui should pass
    • yarn storybook should run
    • yarn types should pass without error
    • yarn lint should pass without error or warnings

The prop value with an expression type of MetaProperty could not be
resolved. Please file an issue (
https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this
fixed immediately.
Fixes LessonOverview.stories.tsx and LessonsIndex.stories.tsx stories
Vite relies on `build.target` config
This ensures core settings are applied even if vite.config.ts has an
error in it
This ensures Sentry releases only happen when running builds from
deploy scripts with TYPEY_TYPE_RELEASE and not when running vite builds
or build-storybook from the command line
Turn off debug now because we're done testing
@didoesdigital didoesdigital changed the title Migrate off Create React App Migrate from Create React App and add Vite Nov 2, 2025
@didoesdigital didoesdigital merged commit aca0a03 into master Nov 9, 2025
1 check passed
@didoesdigital didoesdigital deleted the migrate-off-cra branch November 9, 2025 05:39
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.

Migrate off create-react-app

2 participants