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

Something about tailwind config loading changed - headwind works, this doesn't #15

Open
bbugh opened this issue Mar 8, 2024 · 0 comments

Comments

@bbugh
Copy link

bbugh commented Mar 8, 2024

Describe the bug

Hi 👋 thanks for attempting to continue headwind.

I'm trying this extension out coming from abandoned headwind, and I cannot get it to work.

Headwind just works - I install it, configure it for Ruby in headwind.classRegex, and save an erb or .rb file and it correctly sorts tailwind on all of my files.

With this extension, it throws an error that the tailwind configuration file isn't found. I thought #11 would help, but that just suppresses the error, it doesn't resolve the issue.

To Reproduce

If I try to specify the tailwind configuration file, it breaks:

  1. Add "tailwind-raw-reorder.tailwindConfigPath": "config/tailwind.config.js" to settings.json

  2. It throws an error Cannot find module 'tailwindcss/defaultTheme' Require stack: - /rails-project-path/config/tailwind.config.js.

    The tailwind config includes the default theme for some overrides:

    const defaultTheme = require('tailwindcss/defaultTheme')

If I specify an empty tailwind configuration file and remove the tailwindConfigPath, then it will work, but that's not ideal:

# /tailwind.config.js
module.exports = {}

Expected behavior

It should work :)

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

1 participant