JeffreyWay / laravel-mix-tailwind

mix.tailwind()
347 stars 25 forks source link

JIT not working with run watch #34

Open Pezhvak opened 2 years ago

Pezhvak commented 2 years ago

When executing npm run watch JIT will not pick up the changes, however i could get it to work by changing run command in packages.json from "watch mix watch", to "TAILWIND_MODE=watch mix watch". I tried to contribute but I'm not sure where i should add it.

chrisgrim commented 2 years ago

Hi @Pezhvak
I too am having an issue where something like w-[24.2rem] wont compile with watch unless I cancel the run watch and then run it again. I don't see how to do your change. I tried

"scripts": {
        "dev": "npm run development",
        "development": "mix",
        "watch": "TAILWIND_MODE=mix watch",
        "watch-poll": "mix watch -- --watch-options-poll=1000",
        "hot": "mix watch --hot",
        "prod": "npm run production",
        "production": "mix --production"
    },

but that errored out.

Pezhvak commented 2 years ago

@chrisgrim because you wrote it wrongly.

chrisgrim commented 2 years ago

I did more research into this and discovered it was because I wasn't using the latest laravel-mix. I upgraded and it now works.