tailwind.config.js not being used to compile css
bencarter78 opened this issue · 2 comments
Hello
I'm trying to add some custom colors to my tailwind css but when I run npx nativescript-tailwind tailwind.config.js
it seems to ignore my config file.
My config file is in the root directory and looks like this...
module.exports = {
theme: {
extend: {
colors: {
demo: {
default: '#1ebc3b',
dark: '#0b601b',
},
},
},
},
}
Any ideas what I might be doing wrong here?
Thanks
@bencarter78 Probably your newly generated file is in the node_modules/nativescript-tailwind/dist
folder
However with the latest version it doesn't work out of the box for me probably build.js needs to be updated, and tailwindcss
must be installed as a dependency since it's used by build.js tailwind(config)
For me there was an error that tailwind.css was missing, but it seems to be available only within the node_modules/nativescript-tailwind/dist
folder so I renamed the input/ouput filenames
const inputFile = path.join(__dirname, `dist/${filename}.css`)
const outputFile = path.join(__dirname, `dist/custom-${filename}.css`)
Also what worked for me was the tailwindcss
script
npx tailwind build node_modules/nativescript-tailwind/dist/tailwind.css -o custom-tailwind.css
@svilenkov Please pardon me. I don't understand your above guide. How did you get it to work?