@@ -287,10 +287,13 @@ export default {
287287 const isMonorepo = existsSync ( join ( cwd , 'pnpm-workspace.yaml' ) ) ;
288288
289289 // Define Tailwind Content Paths
290- const contentPaths = [ "'./index.html'" , "'./src/**/*.{js,ts,jsx,tsx}'" ] ;
290+ // Include JSON files specifically
291+ const contentPaths = [ "'./index.html'" , "'./src/**/*.{js,ts,jsx,tsx,json}'" ] ;
291292 if ( isMonorepo ) {
292- contentPaths . push ( "'../../packages/components/src/**/*.{ts,tsx}'" ) ;
293- contentPaths . push ( "'../../packages/plugin-*/src/**/*.{ts,tsx}'" ) ;
293+ const componentsPath = join ( cwd , 'packages/components/src/**/*.{ts,tsx}' ) ;
294+ const pluginsPath = join ( cwd , 'packages/plugin-*/src/**/*.{ts,tsx}' ) ;
295+ contentPaths . push ( `'${ componentsPath } '` ) ;
296+ contentPaths . push ( `'${ pluginsPath } '` ) ;
294297 }
295298
296299 // Create tailwind.config.js
@@ -491,7 +494,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
491494
492495 const layoutCode = `
493496import { Link, useLocation } from 'react-router-dom';
494- import { cn } from '@object-ui/components/lib/utils '; // Try to use from components lib if available or generated utils
497+ import { cn } from '@object-ui/components';
495498
496499const AppLayout = ({ app, children }) => {
497500 const location = useLocation();
@@ -547,6 +550,8 @@ const AppLayout = ({ app, children }) => {
547550 </div>
548551 );
549552};
553+
554+ export default AppLayout;
550555` ;
551556 writeFileSync ( join ( srcDir , 'Layout.tsx' ) , layoutCode ) ;
552557
@@ -651,11 +656,24 @@ export default App;`;
651656
652657 writeFileSync ( join ( srcDir , 'index.css' ) , indexCss ) ;
653658
659+ const cwd = process . cwd ( ) ;
660+ const isMonorepo = existsSync ( join ( cwd , 'pnpm-workspace.yaml' ) ) ;
661+
662+ // Define Tailwind Content Paths
663+ // Include JSON files specifically
664+ const contentPaths = [ "'./index.html'" , "'./src/**/*.{js,ts,jsx,tsx,json}'" ] ;
665+ if ( isMonorepo ) {
666+ const componentsPath = join ( cwd , 'packages/components/src/**/*.{ts,tsx}' ) ;
667+ const pluginsPath = join ( cwd , 'packages/plugin-*/src/**/*.{ts,tsx}' ) ;
668+ contentPaths . push ( `'${ componentsPath } '` ) ;
669+ contentPaths . push ( `'${ pluginsPath } '` ) ;
670+ }
671+
654672 // Create tailwind.config.js
655673 const tailwindConfig = `/** @type {import('tailwindcss').Config} */
656674export default {
657675 darkMode: ['class'],
658- content: ['./index.html ', './src/**/*.{js,ts,jsx,tsx}' ],
676+ content: [${ contentPaths . join ( ', ' ) } ],
659677 theme: {
660678 extend: {
661679 borderRadius: {
0 commit comments