This was the migration of
sulat baybayin
website from itsPHP
source to aJavaScript
framework adaptation
- Vite
- ReactJs
- react-router-dom
- TailwindCSS
- PostCSS
- AutoPrefixer
- @fortawesome/react-fontawesome
- @fortawesome/free-solid-svg-icons
- @fortawesome/free-brands-svg-icons
- Run this code to your terminal
npm create vite@latest my-app
where my-app is your project name - Navigate to your project (
my-app
) using cd and runnpm install
- Other packages such as TailwindCSS are not installed, if you want, you may install it using
npm install tailwindcss postcss autoprefixer
those three packages are important too - In addition with the 3rd step, you also need to install the fortawesome packages if you want to use the fontawesome icons, just install the react-fontawesome and the related icons such as free-solid-svg-icons and/or free-brands-svg-icons for brand icons
- Take note:
react-router-dom
is not included in the installation of reactjs, you need to install it manually
- You just need to execute
npx tailwindcss init
and modify thetailwind.config.js
under thecontent
, just add"./index"
and"./src/**/*.{js,jsx}"
. - Next is you need to go to
index.css
under thesrc
folder, on the top add these three codes:@tailwind base;
@tailwind components;
and@tailwind utilities;
- Next is you need to create a new file alongside with
tailwind.config.js
name itpostcss.config.js
and just copy and paste the code what's on mypostcss.config.js
- Lastly, go to
package.json
and remove the whole line:type: "module",
it was under of theversion
sometimes.
Just run
npm run dev
but you may also customize it, just rename thedev
underscripts
inpackage.json
just like mine. If you usestart
just executenpm start
but if not,run
is required
If ever you add
react-router-dom
, you need to modify themain.jsx
, just use the as the parent for