Skip to content

upgrade: migrate to Vite 8 and update related dependencies#38

Draft
muleyuck wants to merge 2 commits intomainfrom
feature/support-vite-8
Draft

upgrade: migrate to Vite 8 and update related dependencies#38
muleyuck wants to merge 2 commits intomainfrom
feature/support-vite-8

Conversation

@muleyuck
Copy link
Owner

@muleyuck muleyuck commented Mar 21, 2026

Summary

  • Upgrade Vite from 7.2.4 to 8.0.1, which uses Rolldown (Rust-based) internally for faster builds
  • Update related dependencies for Vite 8 compatibility

Changes

  • vite: ^7.2.4^8.0.1
  • @vitejs/plugin-react: ^5.2.0^6.0.1 (Oxc-based, Vite 8 optimized)
  • @tailwindcss/vite: ^4.2.1^4.2.2 (Vite 8 support)
  • tailwindcss: ^4.2.1^4.2.2
  • overrides.rollup: restored as ^2.80.0 to fix high severity vulnerability in @crxjs/vite-plugin's rollup 2.x dependency (GHSA-mw96-cpmx-2vgc)

Test Plan

Commands

  • Run npm run build and confirm dist/ is generated without errors
  • Run npm run test and confirm all tests pass
  • Run npm audit and confirm 0 vulnerabilities

E2E (Manual)

  • Load dist/ via chrome://extensions/ → Enable Developer mode → Load unpacked, confirm the extension loads without errors

Image upload

  • Open popup, select a PNG file — confirm the overlay appears on the page
  • Open popup, select a JPEG file — confirm the overlay appears on the page
  • Open popup, select an SVG file — confirm the overlay appears correctly scaled
  • Open popup, paste a PNG/JPEG image from clipboard — confirm the overlay appears
  • Open popup, paste an SVG as text/plain — confirm the overlay renders correctly

Drag & resize

  • Drag the overlay to a new position — confirm it moves correctly
  • Resize the overlay from each of the 8 handles — confirm resizing works
  • Enable aspect ratio lock, resize — confirm aspect ratio is maintained

Toolbar

  • Click the settings icon to collapse the toolbar — confirm it hides; click again to expand
  • Enter values directly in the Width / Height inputs — confirm the overlay resizes accordingly
  • Click the aspect ratio lock/unlock button — confirm the lock state toggles
  • Click Fit to Viewport — confirm the overlay expands to fill the viewport
  • Click Restore size — confirm the overlay returns to its previous size and position
  • Click the visibility toggle — confirm the overlay hides; click again to show
  • Adjust the opacity slider — confirm opacity changes in real time
  • Click the Delete button — confirm the overlay is removed

Keyboard shortcuts

  • Focus the overlay, press Arrow keys — confirm it moves 1px per key press
  • Focus the overlay, press Shift + Arrow keys — confirm it moves 10px per key press
  • Focus the overlay, press Backspace — confirm the overlay is deleted

@muleyuck
Copy link
Owner Author

muleyuck commented Mar 21, 2026

Problem

Vite 8 switched its internal bundler from Rollup to Rolldown.
The @crxjs/vite-plugin configures content script builds via config.build.rollupOptions in its plugin hook, but Vite 8 ignores plugin-set rollupOptions once rolldownOptions has been initialized internally.

The build itself emits a warning that confirms the issue:

[vite] warning: Both `rollupOptions` and `rolldownOptions` were specified by "crx:web-accessible-resources" plugin. `rollupOptions` specified by that plugin will be ignored.

Status

Waiting for @crxjs/vite-plugin to add Rolldown / Vite 8 support.
or
Change framework chrome exntesion (e.g. wxt).


Convert to draft.

@muleyuck muleyuck marked this pull request as draft March 21, 2026 01:20
@muleyuck muleyuck force-pushed the feature/support-vite-8 branch from 1500942 to 542589b Compare March 22, 2026 23:28
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.

1 participant