From 827ceee0e129c92a0c1db6e2536d3cb9db1bca1e Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Wed, 12 Nov 2025 16:29:51 -0800 Subject: [PATCH] move to using /src - still css issue work --- postcss.config.js | 9 +++++++++ tailwind.config.js | 11 ++++++++++- vite.config.ts | 35 ++++++++--------------------------- 3 files changed, 27 insertions(+), 28 deletions(-) create mode 100644 postcss.config.js diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 00000000..67ea783a --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,9 @@ +// postcss.config.js + +console.log('--- [EXECUTION PROOF] postcss.config.js is being loaded. ---'); + +export default { + plugins: { + '@tailwindcss/postcss': {}, + }, +}; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index eafb746d..b942dfcd 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,2 +1,11 @@ // tailwind.config.js -throw new Error('--- THIS IS THE TAILWIND CONFIG ERROR TEST. IF YOU SEE THIS, THE FILE IS BEING READ. ---'); \ No newline at end of file + +console.log('--- [EXECUTION PROOF] tailwind.config.js is being loaded. ---'); + +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + "./index.html", + "./src/**/*.{js,ts,jsx,tsx}", + ], +}; \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 16c99246..423e2266 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,28 +1,12 @@ +// vite.config.ts + /// import path from 'path'; import { defineConfig as defineViteConfig } from 'vite'; import { defineConfig as defineVitestConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; -import tailwindcssPostcss from '@tailwindcss/postcss'; -import { sync } from 'glob'; // Import the glob sync function -// --- VITE CONFIG DEBUGGING --- -console.log('--- [VITE CONFIG DEBUG] ---'); -const cwd = process.cwd(); -console.log(`[VITE] Current Working Directory: ${cwd}`); -const contentPatterns = ['./index.html', './src/**/*.{js,ts,jsx,tsx}']; -try { - const foundFiles = sync(contentPatterns, { cwd, absolute: true }); - console.log(`[VITE] Glob sync found ${foundFiles.length} files from CWD:`); - console.log(foundFiles.slice(0, 15)); // Log the first 15 found files -} catch (e) { - console.error('[VITE] Glob sync failed!', e); -} -console.log('--- [VITE CONFIG DEBUG END] ---'); -// --- END VITE CONFIG DEBUGGING --- - - -const __dirname = path.dirname(new URL(import.meta.url).pathname); +console.log('--- [EXECUTION PROOF] vite.config.ts is being loaded. ---'); const vitestConfig = defineVitestConfig({ test: { @@ -33,20 +17,17 @@ const vitestConfig = defineVitestConfig({ const viteConfig = defineViteConfig({ plugins: [react()], - css: { - postcss: { - plugins: [ - tailwindcssPostcss, - ], - }, - }, + + // THE 'css' BLOCK IS REMOVED to allow for standard auto-discovery. + // We will now rely on vite build --debug to prove it finds postcss.config.js. + server: { port: 3000, host: '0.0.0.0', }, resolve: { alias: { - '@': path.resolve(__dirname, './src'), + '@': path.resolve(process.cwd(), './src'), } }, });