Have a modern version of Node.installed. Last check was with v20.11
- Open a Terminal in the folder containing the package.json
- Type
npm ito install the dependencies inside of the project automatically - Type
npm run devinto the terminal and see if your files would be compiled correctly - Take a look at the
index.ts, the package.json and thetsconfig.jsonfile to see how they work - The
index.tsfile is the entry-point of your application (defined inrollup.config.js) - see how it can import other modules - after you watched how the typescript modules work with each other you can delete all .ts files in the src folder except
index.ts - then empty the
index.tsfile and empty the body of yourindex.htmlfile and start building your own app
- After you did set up your application, run
npm run buildto compile it. If there are no erros, there should be a "build"-folder in your project folder - take a look at
index.html- it should already have a script file connected to your TypeScript (The browser can only run JavaScript)
Write any source files in typescript inside the source folder, the main file being index.ts as entry file for vite.
run npm run preview to preview your executed build