https://github.com/iirving/vue-sfc-async-loader
Vue 3 demo with a asynchronously loaded component in a single file component
https://github.com/iirving/vue-sfc-async-loader
javascript vite vue vue3
Last synced: about 2 months ago
JSON representation
Vue 3 demo with a asynchronously loaded component in a single file component
- Host: GitHub
- URL: https://github.com/iirving/vue-sfc-async-loader
- Owner: iirving
- Created: 2023-12-04T22:05:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T22:09:07.000Z (about 2 years ago)
- Last Synced: 2025-02-28T16:17:57.913Z (10 months ago)
- Topics: javascript, vite, vue, vue3
- Language: Vue
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-sfc-async-loader
Vue 3 in Vite.
## Asynchronously Loaded Component
The defineAsyncComponent function is used to import the BigYellowUserName component asynchronously, in other words not synchronously with the other ellemnts on the page. The loading state is controled by the showUserName value and the toogle button.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Compile and Minify for Production
```sh
npm run build
```
### Lint with [ESLint](https://eslint.org/)
```sh
npm run lint
```