Ruby on Rails Pug probems
See original GitHub issueI’ve got couple of problems with Rails and Windi on Vite One are that tailwind.config.js / windi.config.js / windi.config.ts configs are not being loaded when running bin/vite de, only settings from vite.config.ts works.
Also I’ve got problem with pug, div.bg-white
don’t work but div(class='bg-white')
will work or
div {
@apply bg-white;
}
also works, I can’t figure normal classes to work with pug, I did try setting in vite.config.ts scanning, nothing works.
My config
import { defineConfig } from "vite"
import RubyPlugin from "vite-plugin-ruby"
import WindiCSS from "vite-plugin-windicss"
import vue from "@vitejs/plugin-vue"
export default defineConfig({
plugins: [
WindiCSS({
scan: {
//////// this one helps but doesn't fix problem
dirs: ["."], // all files in the cwd
fileExtensions: ["vue", "js", "ts", "pug"], // also enabled scanning for js/ts
},
}),
RubyPlugin(),
vue(),
],
})
also got pug dev dependency installed
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
SimpleDelegator autoloading issues with Rails
The problem Both Rails (code) and SimpleDelegator (code) hook into const_missing . Rails does it for autoloading. Since the SimpleDelegator superclass is ...
Read more >Rails with Jader gets 'failed to require "fs"' error - Stack Overflow
I am trying to use client side Jade templates that are precompiled by Ruby on Rails and available through JST. I added the...
Read more >Pug vs Rails | What are the differences? - StackShare
Pug can be classified as a tool in the "Templating Languages & Extensions" category, while Rails is grouped under "Frameworks (Full Stack)". "Elegant...
Read more >Using Jade (Pug) to preprocess HTML - Nikita Kazakov
I do use HAML with Ruby and Ruby on Rails and it is very similar. ... Jade Templating language, now known as Pug,...
Read more >Which is fastest? ERB vs. HAML vs. Slim - Honeybadger.io
Ruby and the Rails gem are pretty much what we need to get started. For this tutorial, Visual Studio Code is the IDE...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@xxSkyy Make sure to provide the
root
option to the Windi CSS plugin, as in these instructions.I am not familiar with ruby, but can you try this:
I guess the ruby plugin might change the vite’s root by somehow.