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

feat: migrate from CRA4 to Vite, Storybook to v8, jest to Vitest #7285

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Apr 24, 2024

This PR moves the frontend toolchain from CRA4 to Vite.
Generally everything seems to be working fine, including decryption workers.

Requires a bunch of changes that has to be performed all at the same time:

  • Jest -> Vitest
  • Storybook v6 -> v8 (less painful than wrangling Storybook v6 to work with vite)

TODO:

  • move back dd-chunk pipeline to vite build
  • Test on GSIB

@karrui karrui changed the title feat: add initial vite config and new eslint rules wip: migrate from CRA4 to Vite Apr 24, 2024
@karrui karrui marked this pull request as ready for review April 24, 2024 07:59
@karrui karrui marked this pull request as draft April 24, 2024 10:02
@karrui
Copy link
Contributor Author

karrui commented Apr 26, 2024

@KenLSM see chromatic useful. will ensure the migration has 0 frontend changes!!!

@karrui karrui changed the title wip: migrate from CRA4 to Vite wip: migrate from CRA4 to Vite, Storybook to v8, jest to Vitest Apr 26, 2024
@karrui karrui changed the title wip: migrate from CRA4 to Vite, Storybook to v8, jest to Vitest feat: migrate from CRA4 to Vite, Storybook to v8, jest to Vitest Apr 26, 2024
@karrui karrui marked this pull request as ready for review April 26, 2024 05:46
@karrui
Copy link
Contributor Author

karrui commented Apr 29, 2024

@justynoh this PR officially has no regressions hehehehe

@karrui karrui requested review from KenLSM and justynoh April 29, 2024 12:01
@karrui
Copy link
Contributor Author

karrui commented Apr 30, 2024

@justynoh added datadog chunking back to the pipeline. Can push to staging to try?

@karrui karrui force-pushed the 04-23-fix_remove_erroneous_react_type_pkg_install_on_root branch from 0a96443 to 9f75cd7 Compare May 2, 2024 04:34
@karrui karrui force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 2c7a9e4 to 9177241 Compare May 2, 2024 04:34
frontend/package.json Outdated Show resolved Hide resolved
frontend/package.json Outdated Show resolved Hide resolved
frontend/package.json Outdated Show resolved Hide resolved
@karrui karrui mentioned this pull request May 3, 2024
2 tasks
Base automatically changed from 04-23-fix_remove_erroneous_react_type_pkg_install_on_root to 04-23-feat_upgrade_prettier_to_v3 May 15, 2024 12:34
Base automatically changed from 04-23-feat_upgrade_prettier_to_v3 to develop May 20, 2024 13:51
…tial_vite_config_and_new_eslint_rules

# Conflicts:
#	frontend/.storybook/main.js
#	frontend/package-lock.json
#	frontend/package.json
#	frontend/src/components/Field/Attachment/Attachment.tsx
#	frontend/src/components/Searchbar/Searchbar.stories.tsx
#	frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/FieldListDrawer/field-panels/MyInfoPanel.tsx
#	frontend/src/features/admin-form/share/ShareFormModal.tsx
#	frontend/src/features/public-form/PublicFormContext.tsx
#	frontend/src/hooks/useMdComponents.tsx
#	playwright.config.ts
#	shared/constants/form.ts
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch 7 times, most recently from f3f55e9 to 1754bee Compare September 18, 2024 10:28
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 1754bee to 2998079 Compare September 18, 2024 10:54
@mergify mergify bot mentioned this pull request Sep 18, 2024
2 tasks
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 62311bd to e06fa47 Compare September 18, 2024 11:34
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch 2 times, most recently from 1d546e2 to 7fba8d0 Compare September 18, 2024 12:13
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 7fba8d0 to dabcfa1 Compare September 18, 2024 12:41
@KenLSM KenLSM force-pushed the 04-23-feat_add_initial_vite_config_and_new_eslint_rules branch from 88d0aaf to 4561bf8 Compare September 18, 2024 13:33
@@ -8,6 +8,8 @@
"jszip": "^3.7.1",
"libphonenumber-js": "^1.10.48",
"lodash": "^4.17.21",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

@kevin9foong btw we forgot to add these two packages in to /shared 💀.

Finally solved final piece of why chromatic publishing fails when using vite/rollup. webpack is a little looser in resolving imports thus we didn't notice it while rollup/pnpm are much stricter.

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