Use nunjucks-precompile under windows
By QQCif
Avoid using under windows if your template contains non-ascii characters. For reasons I cannot figure out there are always strange characters in the compiled fileā¦
I tried to run below command under powershell, still got corrupted file.
npx nunjucks-precompile PATH_TO_TEMPLATE_FILE/FOLDER | out-file -filepath PATH_TO_OUTPUT_JS_FILE -encoding Default