One template to rule them all (not really :P) Powered by a bunch of awesome plugins, tailored to make creating your next server-side generated Vue 3 app a breeze
๐๏ธ File based routing - follow best practices and keep everything organized
๐ฆ Components auto importing - Remove unnecessary boilerplate
๐ Layout system - Style parts of your app differently
๐จ Windi CSS - Utility-first CSS framework for making UIs fast
VSCode(IDE) + Vetur(Extension)
Make sure to enable vetur.experimental.templateInterpolationService
in settings!
Vetur has a good support for .vue
components as of recently, if they are imported directly in <script>
tag. However, since components in this setup are auto-imported, If you want to have support for auto-imported components, Volar will recognize components.d.ts
file generated at the root of the project which will provide type definitions (I chose to opt-out that file from version control, but you can make that decision for yourself)
- Open
src/main.ts
in VSCode - Open the VSCode command palette
- Search and run "Select TypeScript version" -> "Use workspace version"
File based routing & auto-importing of components are very similar to the way Framework Nuxt.js handles them, that I'll link it's documentation, and just explain differences:
Differences:
- Dynamic routes are written like
[id].vue
instead of_id.vue
(feature for support of underscore is still experimental in one of the plugins) - Components are also auto imported in other components, not just the pages
- You can override route object with custom
<route>
block inside pages, and one of it's propertieslayout
will wrap the page with the component of the same name, as the value of that property that's found inlayouts
folder
- Spin up development server
npm run dev
- Bundle app for production
npm run build
which will generatedist
folder - Preview generated production-ready app
npm run preview