Code Monkey home page Code Monkey logo

Comments (7)

brenogazzola avatar brenogazzola commented on July 30, 2024

1 - Which css gem are you using: cssbundling-rails, dart-sass or tailwind-rails?

2 - Do you have a process running to watch the files and recompile when changing?

3 - Do changes in application.css work at least?

from propshaft.

loqimean avatar loqimean commented on July 30, 2024

1 - Which css gem are you using: cssbundling-rails, dart-sass or tailwind-rails?

2 - Do you have a process running to watch the files and recompile when changing?

3 - Do changes in application.css work at least?

1 - tailwindcss-rails
2 - what do you mean? like bin/dev?
3 - yeah, changes copiles of course in this file, 'cause I attached it to application.html.erb in stylesheets_pack_tag, even if I attach file buttons.css (I mean by tag stylesheets_pack_tag) changes tracks too

from propshaft.

brenogazzola avatar brenogazzola commented on July 30, 2024

Yes, bin/dev. The tailwindcss-rails creates a Procfile that includes the watcher process:

web: bin/rails server -p 3000
css: bin/rails tailwindcss:watch

So, the usual "flow" is:
1 - You change app/assets/stylesheets/application.tailwind.css
2 - The watcher process noticed the changes, recompiles and places the file in app/assets/builds/tailwind.css
3 - Propshafts notices that the file it was tracking (app/assets/builds/tailwind.css) changed, so it reloads that file
4 - The changes become visible on the next page reload.

So, what I think is happening is that when you change the buttons.css file, instead of the application.tailwind.css file, the tailwind watcher is not noticing the change, and thus not recompiling.

Could you please test the following?
1 - Stop ./bin/dev
2 - Delete app/assets/builds/tailwind.css
3 - Run ./bin/dev
4 - Check app/assets/builds/tailwind.css exists
5 - Change button.css
6 - Check if the change is reflected in app/assets/builds/tailwind.css.

Is the answer to 6 is "No", then this is a problem in the tailwind gem and it's better if we move this discussion there.

from propshaft.

loqimean avatar loqimean commented on July 30, 2024

Yes, bin/dev. The tailwindcss-rails creates a Procfile that includes the watcher process:

web: bin/rails server -p 3000
css: bin/rails tailwindcss:watch

So, the usual "flow" is: 1 - You change app/assets/stylesheets/application.tailwind.css 2 - The watcher process noticed the changes, recompiles and places the file in app/assets/builds/tailwind.css 3 - Propshafts notices that the file it was tracking (app/assets/builds/tailwind.css) changed, so it reloads that file 4 - The changes become visible on the next page reload.

So, what I think is happening is that when you change the buttons.css file, instead of the application.tailwind.css file, the tailwind watcher is not noticing the change, and thus not recompiling.

Could you please test the following? 1 - Stop ./bin/dev 2 - Delete app/assets/builds/tailwind.css 3 - Run ./bin/dev 4 - Check app/assets/builds/tailwind.css exists 5 - Change button.css 6 - Check if the change is reflected in app/assets/builds/tailwind.css.

Is the answer to 6 is "No", then this is a problem in the tailwind gem and it's better if we move this discussion there.

answer to 6 is "No" for my bad(, it's not to change this file, it's even just not load the file to the site

from propshaft.

brenogazzola avatar brenogazzola commented on July 30, 2024

@loqimean Do you think you can provide me with a minimal project that demonstrates the problem? I'll debug it and figure out where the problem is.

from propshaft.

loqimean avatar loqimean commented on July 30, 2024

@loqimean Do you think you can provide me with a minimal project that demonstrates the problem? I'll debug it and figure out where the problem is.

okay, I will tag you when it's will be done

from propshaft.

dhh avatar dhh commented on July 30, 2024

Reopen when you have a reproducible setup.

from propshaft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.