Skip to content

chore: [SDK-4201] migrate from Vite + Bun to Vite+ toolchain#1444

Merged
fadi-george merged 8 commits intomainfrom
fadi/sdk-4201-add-vite-to-web-sdk
Mar 24, 2026
Merged

chore: [SDK-4201] migrate from Vite + Bun to Vite+ toolchain#1444
fadi-george merged 8 commits intomainfrom
fadi/sdk-4201-add-vite-to-web-sdk

Conversation

@fadi-george
Copy link
Contributor

@fadi-george fadi-george commented Mar 23, 2026

Description

1 Line Summary

Migrate the Web SDK build, test, lint, and CI/CD pipeline from Vite + Bun to the Vite+ (vp) unified toolchain.

Details

  • Replaces Bun lockfile with pnpm, removes standalone prettier/oxlint configs in favor of vp check
  • Consolidates vitest.config.ts into the main vite.config.ts
  • Reads sdkVersion directly from package.json instead of relying on npm_package_config_* env vars (which vp run does not set)
  • Adds size-limit and vite-plus as direct dev dependencies
  • Bundle sizes are ~200 bytes (gzipped) larger due to Rolldown's heavier CJS interop for the jsonp package. Size limits adjusted accordingly.

Note: Linting will fail until a follow-up PR applies formatting fixes (vp check --fix reformats 303 files). This PR intentionally does not include those changes to keep the diff reviewable.

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Validation

Tests

Info

  • All existing tests pass via vp test run --coverage
  • Production build output is functionally identical to the previous Vite builds
  • CI pipeline updated to use vp commands

Checklist

  • All the automated tests pass or I explained why that is not possible
  • I have personally tested this on my machine or explained why that is not possible
  • I have included test coverage for these changes or explained why they are not needed

Programming Checklist
Interfaces:

  • Don't use default export
  • New interfaces are in model files

Functions:

  • Don't use default export
  • All function signatures have return types
  • Helpers should not access any data but rather be given the data to operate on.

Typescript:

  • No Typescript warnings
  • Avoid silencing null/undefined warnings with the exclamation point

Other:

  • Iteration: refrain from using elem of array syntax. Prefer forEach or use map
  • Avoid using global OneSignal accessor for context if possible. Instead, we can pass it to function/constructor so that we don't call OneSignal.context

Screenshots

Info

N/A — toolchain/build infrastructure change with no UI impact.

Checklist

  • I have included screenshots/recordings of the intended results or explained why they are not needed

Related Tickets

SDK-4201


@fadi-george fadi-george changed the title Migrate from Vite + Bun to Vite+ (vp) toolchain chore: [SDK-4201] migrate from Vite + Bun to Vite+ toolchain Mar 23, 2026
@fadi-george fadi-george requested a review from sherwinski March 23, 2026 23:03
@fadi-george fadi-george merged commit ba9d575 into main Mar 24, 2026
4 of 5 checks passed
@fadi-george fadi-george deleted the fadi/sdk-4201-add-vite-to-web-sdk branch March 24, 2026 00:27
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