-
Notifications
You must be signed in to change notification settings - Fork 7
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
build(em): use vite
for dev & build
#1933
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eventualbuddha
force-pushed
the
build/em/vite
branch
from
June 6, 2022 23:44
a9797d3
to
b1f6a4d
Compare
eventualbuddha
changed the title
build(em): add
build(em): use Jun 6, 2022
vite
as an optionvite
for dev & build
eventualbuddha
force-pushed
the
build/em/vite
branch
from
June 7, 2022 15:51
86b4f1f
to
519a9b4
Compare
benadida
approved these changes
Jun 7, 2022
Adds `vite` alongside `react-scripts` as a method for running and building Election Manager. To use it, run `pnpm start:vite` or `pnpm build:vite`. These will soon replace the `react-scripts` method. This took more effort than the equivalent changes for the other frontends. In particular, I had to replace zip-stream with zip.js. I tested it a fair amount, but it's possible there's some difference I haven't accounted for. The reason for the change is that zip-stream uses `readable-streams`, which is a NPM-land implementation of streams from NodeJS. The `readable-streams` package had a circular dependency that rollup chokes on: nodejs/readable-stream#348. While it seems to be fixed in the latest version, the dependency that uses it is not compatible with the latest version so I cannot simply replace all `readable-stream` copies with the newest one. Switching the ZIP library turned out to be simpler.
The equivalent to this with `vite` is `env.d.ts`.
Extracts the `jest` and `babel` configs from `package.json` to their own files and configures Jest to work with packages that have ES modules, specifically `@zip.js/zip.js`.
eventualbuddha
added a commit
that referenced
this pull request
Jun 13, 2022
Should have been done in #1933.
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Refs #1314
Replaces
react-scripts
withvite
when running and building Election Manager. I originally was going to leavereact-scripts
alongsidevite
, but making everything work with@zip.js/zip.js
underreact-scripts
was not going to be straightforward.This took more effort than the equivalent changes for the other frontends. In particular, I had to replace zip-stream with zip.js. I tested it a fair amount, but it's possible there's some difference I haven't accounted for. The reason for the change is that zip-stream uses
readable-streams
, which is a NPM-land implementation of streams from NodeJS. Thereadable-streams
package had a circular dependency that rollup chokes on: nodejs/readable-stream#348. While it seems to be fixed in the latest version, the dependency that uses it is not compatible with the latest version so I cannot simply replace allreadable-stream
copies with the newest one. Switching the ZIP library turned out to be simpler.Demo Video or Screenshot
n/a
Testing Plan
Lots of manual testing of various EM features in Chrome and kiosk-browser. Ensured that ballot packages could be exported properly and validated the contents.
Checklist