This template should help get you started developing with Vue 3 in Vite.
- Vue : This library is directly depended on Vue3
npm
npm i crypted-vue-routeyarn
yarn add crypted-vue-route[https://www.npmjs.com/package/crypted-vue-route]
It is important to set up your project with Vue Router because this library externalizes the routing functionality, providing flexibility to customize and add your own version of routes
<script setup> import {useCryptedRoute} from "crypted-vue-route"; const {setRouteData, getRouteData, route, router, state: filterState} = useCryptedRoute(); const onSubmit = async () => { await setRouteData(filterState.value); }; </script> <template> <main> <input type="search" v-model="filterState.username"/> {{ filterState.username }} <button @click.prevent="onSubmit">CLick!</button> </main> </template>VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
See Vite Configuration Reference.
npm installnpm run devnpm run build