Use the official scaffolding tool to set up a new Vite project with vanilla JavaScript.
npm create vite@latest my-vite-app -- --template vanilla
cd my-vite-app
npm install
This creates a project structure with index.html as the entry point, main.js importing modules, and default npm scripts.