# Usage
TIP
Vapper requires Vue to be version 2.6+
# Integrated into the Vue CLI 3/4 project
TIP
Here is a simple and working example: vapper-vue-cli-example (opens new window).
- Create a project using the
vue createcommand:
yarn global add @vue/cli
vue create my-vapper-app
If you already have a project created with Vue CLI, you can skip this step.
- Install
@vapper/core
yarn add @vapper/core vue-router
vue-router (opens new window) must be installed and used in the Vapper project. If you have already installed vue-router when creating the project, you can ignore it.
- add
npm scripts
{
"scripts": {
"dev": "vapper dev",
"build": "vapper build",
"start": "vapper start"
}
}
- Modify the entry file:
Finally, you need to modify your entry file as required by SSR: entry file document
# Integrated into the Poi project
TIP
Here is a simple and working example: vapper-poi-example (opens new window).
- Create a project with
create-poi-app:
yarn global add create-poi-app
create-poi-app my-vapper-app
If you already have a Poi project, you can skip this step.
- Installation dependence:
yarn add @vapper/core @vapper/configer-poi vue vue-router vue-template-compiler -D
- Modify
vapper.config.js:
module.exports = {
entry: 'src/index.js'
}
Because vapper's default entry file is src/main.js, and Poi's default entry file is src/index.js.
- add
npm scripts
{
"scripts": {
"dev": "vapper dev",
"build": "vapper build",
"start": "vapper start"
}
}
- Modify the entry file:
Finally, you need to modify your entry file as required by SSR: entry file document