Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions assets/copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@
"build-server": "tsc && vite build --ssr js/server.js --out-dir ../priv/react-components --minify esbuild && echo '{\"type\": \"module\" } ' > ../priv/react-components/package.json"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.4.7",
"@tailwindcss/forms": "^0.5.7",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.12",
"typescript": "^5.6.2",
"@tailwindcss/postcss": "^4.1.4",
"@tailwindcss/vite": "^4.1.4",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0"
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "^5.6.2",
"vite": "^6.3.3"
},
"dependencies": {
"live_react": "file:../deps/live_react",
"phoenix": "file:../deps/phoenix",
"phoenix_html": "file:../deps/phoenix_html",
"phoenix_live_view": "file:../deps/phoenix_live_view",
"topbar": "^2.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.1.0",
"react-dom": "^19.1.0",
}
}
3 changes: 1 addition & 2 deletions assets/copy/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
"@tailwindcss/postcss": {},
},
};
7 changes: 6 additions & 1 deletion assets/copy/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from "path";
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";

import react from "@vitejs/plugin-react";
import liveReactPlugin from "live_react/vite-plugin";
Expand All @@ -11,7 +12,11 @@ export default defineConfig(({ command }) => {
return {
base: isDev ? undefined : "/assets",
publicDir: "static",
plugins: [react(), liveReactPlugin()],
plugins: [
react(),
liveReactPlugin(),
tailwindcss(),
],
ssr: {
// we need it, because in SSR build we want no external
// and in dev, we want external for fast updates
Expand Down
2 changes: 1 addition & 1 deletion guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ cd assets
npm install -D vite @vitejs/plugin-react

# tailwind
npm install -D tailwindcss autoprefixer postcss @tailwindcss/forms
npm install -D @tailwindcss/forms @tailwindcss/postcss @tailwindcss/vite

# typescript
npm install -D typescript @types/react @types/react-dom
Expand Down
8 changes: 5 additions & 3 deletions live_react_examples/assets/css/app.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import "tailwindcss";

/* using legacy config file */
/* https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file */
@config "../tailwind.config.js";

@layer base {
:root {
Expand Down
Loading