saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.69k stars 215 forks source link

Created app without tailwind then added tailwind manually #381

Open charbelsako opened 1 year ago

charbelsako commented 1 year ago

this is the repo link

I have tried creating a new project with the tailwind css example and copying the files from there

Sometimes I get this error

Failed to compile ../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[1]!../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[2]!./styles/globals.css TypeError: Cannot read properties of undefined (reading 'blocklist')

other times all css is removed from the page adding tailwind classes doesn't work but @apply works

I think this is because of @tailwindcss not being recognized

2023-07-02-215525_863x1043_scrot

For reference this is what it looks like before applying tailwindcss 2023-07-02-215741_864x617_scrot

m5x5 commented 10 months ago

Hey there, to me it seems like TailwindCSS is initializing correctly. And is also able to locate the css files. To me it seems like it isn't able to find the components and thus isn't able to add necessary styles.

Just in case you don't know yet: TailwindCSS locates the components from the project in files that you provide it with in the TailwindCSS config. Files are then scanned for TailwindCSS class names and these are added to the styles it's generating. If the collection of class names from files isn't working just make sure the paths you provided it with in it's config are correct.

Hope it helps 👍🏻