From fd5c14a1bdfe6220c8f5e1cba74f2306da64ef97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Gerard?= <40648115+GaetanGrd@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:39:14 +0100 Subject: [PATCH 1/2] Update Tailwind --- .erb/configs/webpack.config.renderer.dev.ts | 16 ++++++---------- .erb/configs/webpack.config.renderer.prod.ts | 16 ++++++---------- postcss.config.js | 6 ++++++ src/renderer/App.tsx | 3 ++- tailwind.config.js | 6 ++---- 5 files changed, 22 insertions(+), 25 deletions(-) create mode 100644 postcss.config.js diff --git a/.erb/configs/webpack.config.renderer.dev.ts b/.erb/configs/webpack.config.renderer.dev.ts index a8d91ee8..324d6cbd 100644 --- a/.erb/configs/webpack.config.renderer.dev.ts +++ b/.erb/configs/webpack.config.renderer.dev.ts @@ -76,14 +76,6 @@ const configuration: webpack.Configuration = { }, }, 'sass-loader', - { - loader: 'postcss-loader', - options: { - postcssOptions: { - plugins: [require('tailwindcss'), require('autoprefixer')], - }, - }, - }, ], include: /\.module\.s?(c|a)ss$/, }, @@ -96,8 +88,12 @@ const configuration: webpack.Configuration = { { loader: 'postcss-loader', options: { - postcssOptions: { - plugins: [require('tailwindcss'), require('autoprefixer')], + postcssOptions: { + plugins: + [ + require('tailwindcss'), + require('autoprefixer'), + ] }, }, }, diff --git a/.erb/configs/webpack.config.renderer.prod.ts b/.erb/configs/webpack.config.renderer.prod.ts index 5e80effd..65939547 100644 --- a/.erb/configs/webpack.config.renderer.prod.ts +++ b/.erb/configs/webpack.config.renderer.prod.ts @@ -58,14 +58,6 @@ const configuration: webpack.Configuration = { }, }, 'sass-loader', - { - loader: 'postcss-loader', - options: { - postcssOptions: { - plugins: [require('tailwindcss'), require('autoprefixer')], - }, - }, - }, ], include: /\.module\.s?(c|a)ss$/, }, @@ -78,8 +70,12 @@ const configuration: webpack.Configuration = { { loader: 'postcss-loader', options: { - postcssOptions: { - plugins: [require('tailwindcss'), require('autoprefixer')], + postcssOptions: { + plugins: + [ + require('tailwindcss'), + require('autoprefixer'), + ] }, }, }, diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 00000000..ce32bac3 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +const tailwindcss = require("tailwindcss"); +const autoprefixer = require("autoprefixer"); + +module.exports = { + plugins: [tailwindcss, autoprefixer], +}; diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index e9826256..e41a0308 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -10,6 +10,7 @@ import { useEffect } from "react"; import { ThemeService } from "./services/theme.service"; import { NotificationOverlay } from "./components/notification/notification-overlay.component"; import { PageStateService } from "./services/page-state.service"; +import "tailwindcss/tailwind.css"; export default function App() { @@ -26,7 +27,7 @@ export default function App() { document.documentElement.classList.remove('dark'); }); }, []); - + return (