Skip to content

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

Description

@bbugh

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions