- Install dependencies (
npm install) - Run build (
npm run build) - Go to build folder (/build)
- Notice line 18 in build/index.js contains references to the dependencies that should have been stripped out. (the dependencies are imported inside of src/main.ts)
Files modified (files of interest):
- vite.config.ts
- build/main.ts
The rest is unmodified files and boilerplate vite vanilla-typescript-template with different folder structure.
One should be able to run npm run preview and get the site rendered without errors.