This repository contains a simple starter template to experiment with the alpha version of Vue 3! ParcelJS is used to bundler the SPA. Typescript is used to make it easier to explore the new API since there is limited documentation.
DISCLAIMERS:
- Vue just entered alpha so there could be bugs
- Single file components (SFC) are not supported, you must use the
template
option in the component - The bundle size is not accurate size since we are not using the production build of Vue
Here are the steps necessary to start experiemnting yourself:
-
Clone this repo
-
Install dependencies
// Using NPM $ npm i // Using Yarn $ yarn
-
Run development server
// Using NPM $ npm run dev // Using Yarn $ yarn dev
-
Build the project (This will not be an accurate bundle size since we are not using the production build of Vue)
// Using NPM $ npm run build // Using Yarn $ yarn build
Since Vue 3 is not released there is currently limited documentation on how to use it. Typescript mitgrates this a little bit because it is easier to explore and understand the new API. That being said there are some places to that could be useful:
- Examples in the Vue 3 source code
- Vue Composition API RFC
- Vue 3 RFCs and potentially open pull requests
- Any sort of unit, integration, or E2E test in the Vue 3 source code (I would start in files that end in
.spec.ts
)
If you would like to build the project using the production build change the alias
field in package.json
to:
{
// ...
"alias": {
"vue": "./node_modules/vue/dist/vue.esm.prod.js"
}
}