Closed niksy closed 7 years ago
Hi @niksy , yes, we plan to bump the nunjucks version but it is not on our priority list at the moment. I will leave this open and we'll try to address it soon.
@dgbeck Just wanted to check out if an update to Nunjucks 2.x is still in the plan? Thanks!
Hi @Daut ,
Thanks for the followup. Yes, we have upgraded nunjuckify to nunjucks 2.x, but unfortunately this issue is preventing us from pushing to master.
https://github.com/mozilla/nunjucks/issues/507
@pepoviola can help you use a patched version of nunjucks if you are in a bind.
Thx!
I wouldn't recomend this as nunjucks 2.x is broken for both brozerify and webpack. And they're not planning anything to do about that before 3.x.
What is the state about v3 now ? It is available now
I'm having a stab today taking nunjucks to v3, I've only just started playing around with Nunjucks very recently.
Not having much luck, but I'm thinking it's more around the runtime shim than just updating to the new format for the precompiler. (Then again, I really don't know what's going on). So if someone is playing with v3 already, please let me know :D
nunjuckify v2, just published, bumps nunjucks dependency to 3.0.0 thx. we having been using nunjucks v3 for some time with no issues, and everything looks to be working as expected now.
let us know if that is not the case for you.
thank you!
I'm having the same issue with this version that I had in my own attempts to bump to v3.
I'm using this completely server-side, and it appears the shim no longer addresses the window object.
ReferenceError: window is not defined
at /Library/WebServer/Documents/projects/hawk-web-server/dist/js/src/views/index.nunj:2:1
at Object.__dirname.286.nunjucks/browser/nunjucks-slim (/Library/WebServer/Documents/projects/hawk-web-server/dist/js/src/views/index.nunj:116:1)
at s (/Library/WebServer/Documents/projects/hawk-web-server/dist/js/node_modules/browser-pack/_prelude.js:1:1)
at /Library/WebServer/Documents/projects/hawk-web-server/dist/js/node_modules/browser-pack/_prelude.js:1:1
at /Library/WebServer/Documents/projects/hawk-web-server/dist/js/src/js/routes/index.js:7:26
I'm guessing it's to do specifically with the update to compiledTemplate += 'var nunjucks = require( "nunjucks/browser/nunjucks-slim" );\n';
vs say the previous method of pulling in the main library and letting that work out if it's on the browser/server. I'm still looking.
If I'm using this the wrong way / not as intended, please let me know and I'll see if there's something else I can try and do/use instead.
Here is my current work around. I've added in a node-only flag to will allow this to run without window objects.
https://github.com/rotundasoftware/nunjucksify/pull/20
May or may not be inline with what this project is doing.
Are there any plans to bump Nunjucks dependancy to version 2?