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

build(frontend): migrate from Create React App to Vite #16

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ terracotta.sqlite
__pycache__
*.egg-info
*.pyc

# frontend config
proxy-table.json
2 changes: 1 addition & 1 deletion frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: ['react-app', 'eslint:recommended'],
extends: ['react-app', 'eslint:recommended', 'eslint-config-prettier'],
rules: {
'react/prop-types': 'off',
'no-unused-vars': 'off',
Expand Down
14 changes: 14 additions & 0 deletions frontend/dev-proxy/proxy-table.cloud.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"/raster": {
"target": "https://jamaica.infrastructureresilience.org",
"changeOrigin": true
},
"/vector": {
"target": "https://jamaica.infrastructureresilience.org",
"changeOrigin": true
},
"/api": {
"target": "https://jamaica.infrastructureresilience.org",
"changeOrigin": true
}
}
23 changes: 23 additions & 0 deletions frontend/dev-proxy/proxy-table.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"/raster": {
"target": "http://localhost:5000",
"changeOrigin": true,
"pathRewrite": {
"^/raster": "/"
}
},
"/vector": {
"target": "http://localhost:8080",
"changeOrigin": true,
"pathRewrite": {
"^/vector": "/"
}
},
"/api": {
"target": "http://localhost:8888",
"changeOrigin": true,
"pathRewrite": {
"^/api": "/"
}
}
}
1 change: 1 addition & 0 deletions frontend/public/index.html → frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
Loading