Building next.js, react.js app won’t see general styles, why?

  Kiến thức lập trình

I spent some time to fix one issue while creating next.js, react.js app. I used npm init as a start, then I execute command like npm install tailwindcss postcss autoprefixer and npx tailwindcss init -p. Then I add start, dev, build scripts to config app file and added to tailwind.content.js file to content array path to created global.css file from core directory of project an add to this file main tailwindcss general styles. Then I put this file to main app layout.tsx throught import path.

This is ok. And it’s works for me, but…

I worked some time on one test project, do some editing, change *.js to *.tsx config tailwind and postcss files, and my tailwindcss general styles won’t connect to project. On my app header styles tile I saw @tailwind basic;@tailwind utilities; …

I tried all I can find on the Internet. Tried many different thing myself. Went to node_modules folder and search there.

I can fix this problem just one way: uninstall tailwindcss, postcss and autoprefixer, remove *.config files of postcss and tailwind. And reinstalling again this packages and set configuration tailwindcss, and all this like a wrote on first paragraph.

My question: Where this thing that not allowing to catch tailwindcss styles where I build my app? Where this place where all gose wronge? All setting on config files, and all file the same as was before. Who not allowing to fix this without reinstalling packages?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT