Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate from Parcel v1 to Vite #1558

Merged
merged 7 commits into from
Jul 21, 2024
Merged

Conversation

eglitise
Copy link
Collaborator

@eglitise eglitise commented Jul 19, 2024

The time has finally come. This PR ditches Parcel v1 and migrates to the very latest (!) version of Vite! 🎉
Other changes include:

  • Simplifying the @import paths for the .less styling file (this didn't work in Parcel)
  • Removing the additional HMR code in index.jsx (Vite supports this by default)
  • Using an alias to solve the problem with handling web/Electron polyfill imports (probably also possible in Parcel, but likely not as straightforward, since there was no dedicated Parcel config file)
  • Changing i18n locale paths depending on whether dev or production mode is used
  • Skipping the browser build in Azure pipelines during publishing (this is not directly related to Vite)
  • Updating the node scripts for consistency and ease of use
  • Moving to vitest for unit and integration tests. E2E tests were left as-is, but I don't think they have ever worked anyway.

Some explicitly imported dependencies used with Parcel can now also be removed (e.g. postcss), but I am trying to keep this PR as small as possible, so that will come in a separate PR. It will also include the removal of mocha/chai and E2E tests being commented out, to be rebuilt in the future.

Basic functionality was tested on both macOS and Windows for:

  • Browser dev build
  • Browser production build
  • Electron dev build
  • Electron production build
  • Electron packaged app

One unexpected benefit from this migration is that the app seems to open notably faster as well!

Closes #1453.

@github-actions github-actions bot added chore Internal changes not visible to the user dependencies Dependency updates, removals or additions documentation Improvements or additions to documentation labels Jul 19, 2024
package.json Show resolved Hide resolved
@eglitise
Copy link
Collaborator Author

Hmm that's odd, I had the tests run just fine previously...

@eglitise eglitise marked this pull request as draft July 19, 2024 08:28
@eglitise eglitise marked this pull request as ready for review July 19, 2024 13:03
Copy link
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing work!

@KazuCocoa
Copy link
Member

lg overall, I'll do some testing on my local as well tomorrow.

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg overall. Ran them on my local as well. Had the same comments for the path related (to use join) which is already addressed, although others look good for me.

vite.config.mjs Outdated Show resolved Hide resolved
@eglitise eglitise merged commit c0b59d1 into appium:main Jul 21, 2024
7 checks passed
@eglitise eglitise deleted the migrate-to-vite branch July 21, 2024 14:41
laib3 pushed a commit to laib3/appium-inspector that referenced this pull request Nov 16, 2024
* chore: migrate from Parcel v1 to Vite

* test: move to vitest & update tests

* chore: run prettier

* chore: address review comments

* chore: use split path for all path.join calls

* chore: run prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Internal changes not visible to the user dependencies Dependency updates, removals or additions documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: replace Parcel with Vite
4 participants