diff --git a/package.json b/package.json index ba514b8..2a17a0a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ }, "scripts": { "dev": "vite", - "build": "tsc && vite build && electron-builder", + "watch-tailwind": "tailwindcss --watch", + "build": "tsc && vite build && electron-builder && tailwindcss", "preview": "vite preview", "pree2e": "vite build --mode=test", "e2e": "playwright test" @@ -26,10 +27,12 @@ "@types/react": "^18.2.20", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.4", + "autoprefixer": "^10.4.16", "electron": "^26.0.0", "electron-builder": "^24.6.3", "react": "^18.2.0", "react-dom": "^18.2.0", + "tailwindcss": "^3.3.3", "typescript": "^5.1.6", "vite": "^4.4.9", "vite-plugin-electron": "^0.13.0-beta.3", diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 0000000..f204746 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + // 'tailwindcss/nesting': {}, // https://tailwindcss.com/docs/using-with-preprocessors#nesting + tailwindcss: {}, + autoprefixer: {}, + }, +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index d5703ce..1495bac 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,23 +1,37 @@ -import { useState } from 'react' -import Update from '@/components/update' -import logoVite from './assets/logo-vite.svg' -import logoElectron from './assets/logo-electron.svg' -import './App.css' +import { useState } from "react"; +import logoVite from "./assets/logo-vite.svg"; +import logoElectron from "./assets/logo-electron.svg"; +import "./App.css"; +import UpdateElectron from "@/components/update-tailwind"; -console.log('[App.tsx]', `Hello world from Electron ${process.versions.electron}!`) +console.log( + "[App.tsx]", + `Hello world from Electron ${process.versions.electron}!`, +); function App() { - const [count, setCount] = useState(0) + const [count, setCount] = useState(0); return ( -
src/App.tsx
and save to test HMR
+
Click on the Electron + Vite logo to learn more
-/public
folder /public
folder{" "}
+ Error downloading the latest version.
+{updateError.message}
+