# Create the project
yarn create vite project_name
# Enter the project folder
cd project_name
# Run Yarn
yarn
# Add Vue 2, Vue Template Compiler and Vite Plugin for Vue 2
yarn add vue@2 vue-template-compiler vite-plugin-vue2 @vitejs/plugin-legacy
# Replace vite.config.js content
import { createVuePlugin } from 'vite-plugin-vue2'
export default {
plugins: [createVuePlugin()]
}
# Replace main.js content
import Vue from 'vue';
import App from './src/App.vue';
new Vue({
render: (h) => h(App),
}).$mount('#app');