Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of gem without sprockets (eg vite) aka standalone use of tailwind generators #367

Open
synth opened this issue May 26, 2024 · 1 comment

Comments

@synth
Copy link

synth commented May 26, 2024

I'd like to use this gem primarily for the scaffolding generators. When the gem is included, I get the following error:

undefined method `assets' for an instance of Rails::Application::Configuration

This takes us to here:

initializer "tailwindcss.assets" do
Rails.application.config.assets.precompile += %w( inter-font.css )
end

My understanding is that Rails.application.config.assets is Sprockets specific. If I comment out this line, the generators work fine. Is there a way to explicitly opt out of this line/initializer or would this be considered a bug, perhaps? This seems to be the only sprockets specific reference, although I'm not too sure. Other things probably don't work in a vite context since assets go in app/frontend typically with Vite. Although, again, in my case, all I'm after is the generators :)

@flavorjones
Copy link
Member

Related: #353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants