https://github.com/openlayers/ol-vite
Using OpenLayers with Vite
https://github.com/openlayers/ol-vite
Last synced: 18 days ago
JSON representation
Using OpenLayers with Vite
- Host: GitHub
- URL: https://github.com/openlayers/ol-vite
- Owner: openlayers
- Created: 2021-10-04T19:05:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T10:39:58.000Z (over 1 year ago)
- Last Synced: 2024-04-22T11:47:49.631Z (over 1 year ago)
- Language: HTML
- Size: 127 KB
- Stars: 28
- Watchers: 6
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# OpenLayers + Vite
This example demonstrates how the `ol` package can be used with [Vite](https://vitejs.dev/).
To get started, run the following (requires Node 14+):
npx create-ol-app my-app --template vite
Then change into your new `my-app` directory and start a development server (available at http://localhost:5173):
cd my-app
npm start
To generate a build ready for production:
npm run build
Then deploy the contents of the `dist` directory to your server. You can also run `npm run serve` to serve the results of the `dist` directory for preview.