Tags: ryanberckmans/create-react-app
Tags
Use recommended tailwind config in react-scripts Per facebook#11717 (comment) When a project uses CRA, it actually ignores the contents of a project's tailwind.config.js and instead only detects the existence of that file: // Check if Tailwind config exists const useTailwind = fs.existsSync( // ignores contents of tailwind.config.js path.join(paths.appPath, 'tailwind.config.js') ); And so instead of CRA obeying the user's config in tailwind.config.js, CRA ships with a default tailwind config which is contrary to the recommendations of tailwind. One result of this is that tailwind css nesting (as providedd by the postcss plugin tailwindcss/nested) does not work in CRA without ejecting. The purpose of this commit is to provide a fork of CRA which enables the recommended configuration of tailwindcss without needing to eject from CRA. This fork can be used as follows via the excellent GitPkg project: // Instead of 'react-scripts' in package.json yarn add -D 'https://gitpkg.now.sh/ryanberckmans/create-react-app/packages/react-scripts?main'
Use recommended tailwind config in react-scripts Per facebook#11717 (comment) When a project uses CRA, it actually ignores the contents of a project's tailwind.config.js and instead only detects the existence of that file: // Check if Tailwind config exists const useTailwind = fs.existsSync( // ignores contents of tailwind.config.js path.join(paths.appPath, 'tailwind.config.js') ); And so instead of CRA obeying the user's config in tailwind.config.js, CRA ships with a default tailwind config which is contrary to the recommendations of tailwind. One result of this is that tailwind css nesting (as providedd by the postcss plugin tailwindcss/nested) does not work in CRA without ejecting. The purpose of this commit is to provide a fork of CRA which enables the recommended configuration of tailwindcss without needing to eject from CRA. This fork can be used as follows via the excellent GitPkg project: // Instead of 'react-scripts' in package.json yarn add -D 'https://gitpkg.now.sh/ryanberckmans/create-react-app/packages/react-scripts?main'
PreviousNext