Skip to content

Commit 29ca287

Browse files
committed
feat(web): integrate Tailwind CSS for styling and add PostCSS configuration
1 parent fa13f6f commit 29ca287

File tree

7 files changed

+433
-2
lines changed

7 files changed

+433
-2
lines changed

packages/web/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@babel/preset-react": "^7.23.3",
6161
"@babel/preset-typescript": "^7.16.0",
6262
"@faker-js/faker": "^9.6.0",
63+
"@tailwindcss/postcss": "^4.1.14",
6364
"@testing-library/jest-dom": "^5.16.5",
6465
"@testing-library/react": "^14.0.0",
6566
"@testing-library/react-hooks": "^8.0.1",
@@ -73,6 +74,7 @@
7374
"@types/react-redux": "^7.1.18",
7475
"@types/react-select": "^5.0.1",
7576
"@types/styled-components": "^5.1.14",
77+
"autoprefixer": "^10.4.21",
7678
"babel-jest": "^29.3.1",
7779
"babel-plugin-styled-components": "^2.0.2",
7880
"eslint-plugin-jest-dom": "^4.0.3",
@@ -84,6 +86,9 @@
8486
"jest-environment-jsdom": "^29.7.0",
8587
"jest-styled-components": "^7.0.5",
8688
"msw": "^1.0.1",
89+
"postcss": "^8.5.6",
90+
"postcss-loader": "^8.2.0",
91+
"tailwindcss": "^4.1.14",
8792
"ts-key-enum": "^2.0.12",
8893
"typescript-plugin-css-modules": "^5.0.1",
8994
"webpack": "^5.76.0",

packages/web/postcss.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
"@tailwindcss/postcss": {},
4+
},
5+
};

packages/web/src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "tailwindcss";

packages/web/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import { createRoot } from "react-dom/client";
33
import { App } from "./App";
4+
import "./index.css";
45

56
const container = document.getElementById("root");
67
const root = createRoot(container);

packages/web/tailwind.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { Config } from "tailwindcss";
2+
3+
const config: Config = {
4+
content: ["./src/**/*.{js,jsx,ts,tsx}", "./src/index.html"],
5+
theme: {
6+
extend: {},
7+
},
8+
plugins: [],
9+
};
10+
11+
export default config;

packages/web/webpack.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,18 @@ module.exports = (env, argv) => {
8383
// css/scss
8484
{
8585
test: /\.css/,
86-
use: [styleLoader, "css-loader"],
86+
use: [
87+
styleLoader,
88+
"css-loader",
89+
{
90+
loader: "postcss-loader",
91+
options: {
92+
postcssOptions: {
93+
config: path.resolve(__dirname, "postcss.config.js"),
94+
},
95+
},
96+
},
97+
],
8798
},
8899

89100
{

0 commit comments

Comments
 (0)