tailwind-raw-reorder icon indicating copy to clipboard operation
tailwind-raw-reorder copied to clipboard

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

Open bbugh opened this issue 1 year ago • 1 comments

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 :)

bbugh avatar Mar 08 '24 15:03 bbugh

same here

muriloime avatar Feb 11 '25 08:02 muriloime