This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Official reference guide - click here.
This is where the root folder / directory of the project will be set (Vite will create the project's root directory later):
npm init vite
Enter the name of the project to create the root-directory:
fcc-markdown-previewer-1.0
In the terminal, choose:
React
and
JavaScript
run the following in the terminal:
# Go inside the created project root-directory.
cd fcc-markdown-previewer-1.0
# Install npm packages that comes with Vite
npm install
# Run vite development server. Start developing.
npm run dev
The development files:
- Source codes - like .js, .css, etc. go inside the ./src sub-folder.
- External files - like json go inside the ./public sub-folder; static assets like images, icons, etc. go inside the ./assets sub-folder.
Create a new repository on the command line.
#
echo "# fcc-markdown-previewer-1.0" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
# The URL below is the created remote repository.
git remote add origin https://github.com/{USER-NAME}/{REPO-NAME}.git
git push -u origin main
Or push an existing repository from the command line.
git remote add origin https://github.con/{USER-NAME}/{REPO-NAME}.git
git branch -M master
git push -u origin master