laravel-mix-tailwind icon indicating copy to clipboard operation
laravel-mix-tailwind copied to clipboard

JIT not working with run watch

Open Pezhvak opened this issue 3 years ago • 3 comments

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.

Pezhvak avatar Dec 19 '21 09:12 Pezhvak

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.

chrisgrim avatar Jan 24 '22 23:01 chrisgrim

@chrisgrim because you wrote it wrongly.

Pezhvak avatar Mar 03 '22 11:03 Pezhvak

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.

chrisgrim avatar Mar 03 '22 17:03 chrisgrim