moyus / laravel-mix-nunjucks

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

I had a few problems when using your extension #14

Closed aau8 closed 1 year ago

aau8 commented 2 years ago

Проблема была в функции run(), а именно в формате пути. Два последних она возвращала с двумя косыми чертами. image image

Помогло дублирование replace, как у первой строки image

aau8 commented 2 years ago

Here are some more problems that I have:

  1. In the run function, not only files with the .njk extension were compiled, but all files. Which is why I received files from style.css at the output - style.html , from index.js - index.html etc.
  2. In the watch function, changes were tracked not only in .njk files, but in all files, i.e. when I updated the style.scss file, your plugin started working
  3. I didn't find a setting for the plugin to tell it where my nunjucks templates are, so as not to specify the whole path every time. I keep all the templates in the _njk folder, so I wanted nunjucks to take everything from there. Perhaps the extension has a setting that does this, please tell me what it's called.

I implemented all this in a separate fork - https://github.com/artemyg0811/laravel-mix-nunjucks I hope some of this will be useful. I'm making a starter template for layout and your extension has helped a lot to work with nunjucks, but at the moment, I can't install it directly, because it doesn't perform the individual functions I need. It would be great if you made changes to your extensions based on my suggestions)))

The starting template in which I use your extension is https://github.com/artemyg0811/dismal-html

moyus commented 1 year ago

Sorry for the late, I will fix it soon.

moyus commented 1 year ago