66
rated 0 times
[
69]
[
3]
/ answers: 1 / hits: 8219
/ 3 Years ago, tue, february 23, 2021, 12:00:00
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.textColor
properties. - Deleting
node_modules
andnpm i
. - Deleting the
build
and 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: [],
};
More From » reactjs