On npm start (craco start) everything works fine and colors are being compiled.
When running npm run build (craco build) though, only one color of each configuration is being compiled, dallas from theme.textColor and vista-white from theme.gradientColorStops.
I tried:
- Reordering
theme.textColorproperties. - Deleting
node_modulesandnpm i. - Deleting the
buildand rebuilding.
// craco.config.js
module.exports = {
style: {
postcss: {
plugins: [require('tailwindcss'), require('autoprefixer')],
},
},
};
// tailwind.config.js
module.exports = {
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
textColor: (theme) => ({
...theme('colors'),
dallas: '#664A2D',
'blue-charcoal': '#24292E',
denim: '#0D66C2',
'spring-green': '#05E776',
flamingo: '#E65A4D',
}),
gradientColorStops: (theme) => ({
...theme('colors'),
'vista-white': '#E1DFDC',
}),
},
variants: {
extend: {},
},
plugins: [],
};