Skip to content

Tags: ryanberckmans/create-react-app

Tags

tailwind-postcss-fix-v0.2

Toggle tailwind-postcss-fix-v0.2's commit message
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'

postcss-tailwind-fix-v0.1

Toggle postcss-tailwind-fix-v0.1's commit message
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'

v5.0.1

Toggle v5.0.1's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
iansu Ian Sutherland