-
Notifications
You must be signed in to change notification settings - Fork 100
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
added vite #175
Closed
Closed
added vite #175
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7244e10
added: vite
sammaji 53e740e
Merge branch 'gis-ops:master' into master
sammaji d567874
added path aliases for vite (#171)
sammaji 561d04c
Merge branch 'master' of https://github.com/samyabrata-maji/valhalla-app
sammaji c0e286e
fixed parsing error
sammaji 24e4db6
renamed js file to jsx
sammaji 34c7b40
replace process.env with import.meta.env
sammaji 5080479
renamed env variables as per vite guidelines
sammaji 9f55167
Merge branch 'master' into master
nilsnolde 1f68ae2
added redux provider
sammaji 356e3e2
removed global css imports
sammaji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
SKIP_PREFLIGHT_CHECK=true | ||
REACT_APP_VALHALLA_URL=https://valhalla1.openstreetmap.de | ||
REACT_APP_NOMINATIM_URL=https://nominatim.openstreetmap.org | ||
REACT_APP_TILE_SERVER_URL="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | ||
REACT_APP_CENTER_COORDS="52.51831,13.393707" | ||
VITE_VALHALLA_URL=https://valhalla1.openstreetmap.de | ||
VITE_NOMINATIM_URL=https://nominatim.openstreetmap.org | ||
VITE_TILE_SERVER_URL="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | ||
VITE_CENTER_COORDS="52.51831,13.393707" | ||
|
||
# uncomment this variable to set boundaries on the leaflet map | ||
# southwest corner, northeast corner | ||
REACT_APP_MAX_BOUNDS="-90,-1e7,90,1e7" | ||
VITE_MAX_BOUNDS="-90,-1e7,90,1e7" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" type="image/png" href="/favicon.png" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
/> | ||
<meta name="theme-color" content="#000000" /> | ||
<!-- | ||
manifest.json provides metadata used when your web app is added to the | ||
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="/manifest.json" /> | ||
<!-- | ||
Notice the use of %PUBLIC_URL% in the tags above. | ||
It will be replaced with the URL of the `public` folder during the build. | ||
Only files inside the `public` folder can be referenced from the HTML. | ||
|
||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
work correctly both with client-side routing and a non-root public URL. | ||
Learn how to configure a non-root public URL by running `npm run build`. | ||
--> | ||
<title>Valhalla FOSSGIS Server Demo App</title> | ||
</head> | ||
<body> | ||
<div id="valhalla-app-root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
|
||
You can add webfonts, meta tags, or analytics to this file. | ||
The build step will place the bundled scripts into the <body> tag. | ||
|
||
To begin the development, run `npm start` or `yarn start`. | ||
To create a production bundle, use `npm run build` or `yarn build`. | ||
--> | ||
</body> | ||
</html> |
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { render } from 'react-dom' | ||
|
||
const container = document.getElementById('valhalla-app-root') | ||
render( | ||
<React.StrictMode> | ||
<h1>Valhalla FOSSGIS Server Demo App</h1> | ||
</React.StrictMode>, | ||
container | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
import svgr from 'vite-plugin-svgr' | ||
|
||
const path = require('path') | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
resolve: { | ||
alias: [ | ||
{ | ||
find: 'actions', | ||
replacement: path.resolve(__dirname, './src/actions'), | ||
}, | ||
{ | ||
find: 'components', | ||
replacement: path.resolve(__dirname, './src/components'), | ||
}, | ||
{ | ||
find: 'Controls', | ||
replacement: path.resolve(__dirname, './src/Controls'), | ||
}, | ||
{ | ||
find: 'images', | ||
replacement: path.resolve(__dirname, './src/images'), | ||
}, | ||
{ | ||
find: 'utils', | ||
replacement: path.resolve(__dirname, './src/utils'), | ||
}, | ||
], | ||
}, | ||
plugins: [svgr(), react()], | ||
}) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it needs to be told how to resolve import paths? or what is that for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It matches for the word in the import statement and replaces it with the given path.
so, vite interprets:
import "action/file.jsx"
asimport "./src/actions/file.jsx"
Its optional.