-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This migrates from the unmaintained CRA to vite, following the steps laid out by @cmacdonnacha in https://cathalmacdonnacha.com/migrating-from-create-react-app-cra-to-vite. Thanks Cathal! For developers, nothing changes unless the backend is also run locally, which now requires a slightly different env variable name. This also eliminates cross-platform issues, especially when developing on macOS. The cost is mainly that we now need to execute one command more than before, but maintenance is much easier.
- Loading branch information
1 parent
be16794
commit 5e66312
Showing
25 changed files
with
5,697 additions
and
36,282 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
.prettierrc.js | ||
.eslintrc.js | ||
env.d.ts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// TODO: Update this with config from https://cathalmacdonnacha.com/setting-up-eslint-prettier-in-vitejs | ||
// This will require fixes in the code, so we're doing it one step at a time | ||
// When migrating, remove the eslint-config-react-app dependency | ||
module.exports = { | ||
extends: ['react-app'], | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,23 +36,19 @@ jobs: | |
backend: | ||
image: ghcr.io/envelope-zero/backend:v3.1.1 | ||
env: | ||
CORS_ALLOW_ORIGINS: http://localhost:3001 | ||
API_URL: http://localhost:3001/api | ||
CORS_ALLOW_ORIGINS: http://localhost:3000 | ||
API_URL: http://localhost:3000/api | ||
ports: | ||
- 8080:8080 | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: cypress-io/[email protected] | ||
env: | ||
PORT: 3001 | ||
# The URL that the react-scripts dev server proxies /api to | ||
API_URL: http://localhost:8080 | ||
with: | ||
start: npm start | ||
# Frontend runs on :3001, API on :8080 | ||
wait-on: 'http://localhost:3001, http://localhost:8080' | ||
start: npm run start-ci | ||
# Frontend runs on :3000, API on :8080 | ||
wait-on: 'http://localhost:3000, http://localhost:8080' | ||
browser: chrome | ||
|
||
- uses: actions/[email protected] | ||
|
@@ -102,4 +98,4 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
REACT_APP_VERSION=${{ github.ref_name }} | ||
VITE_VERSION=${{ github.ref_name }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ node_modules | |
/coverage | ||
|
||
# production | ||
/build | ||
dist | ||
|
||
# misc | ||
.DS_Store | ||
|
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
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
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
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
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
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
Oops, something went wrong.