2022-06-02
1585
#react
Lawrence Eagles
114006
Jun 2, 2022 ⋅ 5 min read

Setting up a dev environment with React, Vite, and Tailwind

Lawrence Eagles Senior full-stack developer, writer, and instructor.

Recent posts:

Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 ⋅ 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 ⋅ 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 ⋅ 5 min read
Deno logo over an orange background

How to migrate your Node.js app to Deno 2.0

Deno is a popular JavaScript runtime, and it recently launched version 2.0 with several new features, bug fixes, and improvements […]

Yashodhan Joshi
Dec 17, 2024 ⋅ 7 min read
View all posts

3 Replies to "Setting up a dev environment with React, Vite, and Tailwind"

  1. Nice article.

    Please review your tailwind.config.js file…

    You still need to add index.html into the content array.

    Vite injection point is index.html which is not inside the src folder like react did theirs..

    Great work!

  2. It seems that in this tutorial the “type” in package.json gets set to “module” which is in direct conflict with the config.js files of postcss and tailwind as they use the “require” syntax.
    When running the appications it exits with an error because of that. Only solution I found was to remove the “type” in package.json. Not sure, if this is a good solution though.

  3. Very nice article. I found it very useful and informative.
    There was an error when creating the postcss.config.js file and the error was thrown because the name should be postcss.config.cjs and not .js. I just wanted to point it out for anyone that might find it useful.

Leave a Reply