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

Deprecated middleware options #2133

Open
imnasnainaec opened this issue May 8, 2023 · 8 comments · May be fixed by #3041
Open

Deprecated middleware options #2133

imnasnainaec opened this issue May 8, 2023 · 8 comments · May be fixed by #3041
Assignees
Labels
bug Something isn't working lowpriority This might not be worked on maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.

Comments

@imnasnainaec
Copy link
Collaborator

After starting the frontend in development, a DeprecationWarning briefly appears before being quickly replaced by "Starting the development server...":

(node:78963) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:78963) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
@imnasnainaec imnasnainaec added bug Something isn't working maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. lowpriority This might not be worked on labels May 8, 2023
@imnasnainaec
Copy link
Collaborator Author

Related webpack/react-scripts config issue : facebook/create-react-app#11862

@imnasnainaec
Copy link
Collaborator Author

imnasnainaec commented Feb 20, 2024

It looks like we need to migrate away from create-react-app/react-scripts: https://www.freecodecamp.org/news/how-to-migrate-from-create-react-app-to-vite/ (...but we should be careful about moving to Vite, which doesn't play well with Jest: https://jestjs.io/docs/getting-started#using-vite)

@imnasnainaec
Copy link
Collaborator Author

A few helpful comparisons:

Vite seems to be the fastest and most popular, but may present difficulties with configuration, jest, and environment variables. If Parcel can handle our bundling needs (specifically with our dictionary files), then it may be the simplest to use and maintain.

@imnasnainaec imnasnainaec self-assigned this Feb 26, 2024
@imnasnainaec
Copy link
Collaborator Author

imnasnainaec commented Feb 28, 2024

Used react-scripts eject: master...eject

@imnasnainaec
Copy link
Collaborator Author

Trying Parcel: master...parcel

@imnasnainaec
Copy link
Collaborator Author

Trying Parcel atop the eject: eject...eject-parcel

@imnasnainaec
Copy link
Collaborator Author

imnasnainaec commented Mar 1, 2024

Parcel + Jest WIP: eject...eject-parcel-jest

As of 3de9d73, the build was twice as fast as master, but also twice as large:

  • master: 24MB (one 5MB and the rest under 1MB); vs.
  • eject-parcel-jest: 42MB (two 9MB, one 2MB, and the rest under 1MB).
    And the jest tests are about 50% slower than on master.

@imnasnainaec
Copy link
Collaborator Author

Parcel (with i18n files copied over as static files) + Jest (using Babel): master...parcel-babel-jest

@imnasnainaec imnasnainaec linked a pull request Apr 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lowpriority This might not be worked on maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant