tailwind-ppx icon indicating copy to clipboard operation
tailwind-ppx copied to clipboard

Build Order

Open CarlOlson opened this issue 4 years ago • 2 comments

When using bsconfig.json to generate tailwind.css the first build fails. Builds after the first are fine once tailwind.css has been created.

{
  "sources": [
    {
      "dir": "src",
      "subdirs": true,
      "generators": [
        {
          "name": "gen-tailwind",
          "edge": ["tailwind.css", ":", "styles.css"]
        }
      ]
    }
  ],
  "generators": [
    {
      "name": "gen-tailwind",
      "command": "tailwindcss build $in -o $out -c ../../tailwind.config.js"
    }
  ]
}

I tried different options, but it doesn't look like bsconfig is able to handle this. I think this is possible to handle inside the ppx, but I'm not sure.

CarlOlson avatar Feb 14 '21 08:02 CarlOlson

Ugh, yeah this is a perennial issue -- several people have asked about it before. I personally think there is a problem with bsconfig, but it might be worth just asking Hongbo/ReScript people on the Discord.

In the meantime, I will take a second look to see if something's changed/if there's a way to fix it.

Thanks for opening the issue!

dylanirlbeck avatar Mar 10 '21 15:03 dylanirlbeck

@CarlOlson Did you ever reach out via Discord and/or fix the issue? If so, I'd love to update the ppx docs with a workaround. Thanks!

dylanirlbeck avatar Apr 04 '21 15:04 dylanirlbeck