‘vite-plugin-singlefile’ allows you to inline all JavaScript and CSS resources directly into the final index.html file.
To install type this in command prompt
npm install vite-plugin-singlefile
Add the given code in vite.config.js
import { viteSingleFile } from "vite-plugin-singlefile"
export default defineConfig({
plugins: [vue(), viteSingleFile()],
})
Build the app and now a single index.html file will be created.