moyus / laravel-mix-nunjucks

Laravel Mix extension to compile Nunjucks templates
MIT License
11 stars 5 forks source link

mix.postCss files trigger njk compilation incrementally on save #22

Open sueharaluke opened 1 year ago

sueharaluke commented 1 year ago

Hey there !

Looks like each css file save (inside mix.postCss) compiles nunjucks * how many times you saved.

1st save = 1 compile

image

2nd save = 2 compiles (same njk gets compiled 2 times)

image

3rd save = 3 compiles (same njk gets compiled 3 times)

image

and so on.

I first noticed it using tailwind, but it's reproducible with a plain css. I added inside tests folder.
(https://github.com/moyus/laravel-mix-nunjucks/compare/master...sueharaluke:laravel-mix-nunjucks:master) Steps to reproduce:

For now, I downgraded to version 1.2.0-beta.1 (which didn't have this problem, but compiles _partials to html).

Thanks !

moyus commented 1 year ago

I will look into it later, thanks for your report.