This is a simple weather app made in Svelte 5 with Vite. The user can search for a city and check the current weather, short hourly forecast and the next few days.
- search for cities
- show current weather
- show short hourly forecast
- show 5-day forecast
- switch between Celsius and Fahrenheit
- save recently searched places in localStorage
First install dependencies: npm install
Then start the development server: npm run dev
After that open the address shown in the terminal, usually: http://localhost:5173/
To create the production version: npm run build
To preview it: npm run preview
This project uses Vite as a bundler and Svelte as the framework.
The CSS is written in:
- src/app.css – global styles
- <style> sections inside Svelte components
During build, CSS is processed and transformed:
- Vite collects CSS from the project.
- Svelte processes component styles.
- PostCSS transforms the CSS.
- autoprefixer adds prefixes if needed.
- Final CSS is generated in the build output.
Because of this, the final CSS used by the browser is not exactly the same as the original source files and does not match them 1-to-1.
After running: npm run build
the generated files can be found in:
- dist/assets/ – generated CSS files
- dist/assets/*.css.map – CSS source maps
CSS source maps are enabled in vite.config.js.
The app uses the Open-Meteo API for weather and location data.