Comments (3)
The 1.x version will work with node/umd modules - depending on exactly what you need from your templates, it might do the trick.
Since the 2.x releases of nunjucks, I have not been been able to get a umd build to work which is why node support has been dropped in 2.x.
There were blockers with the dependency tree of chokidar (autoloaded by nunjucks for the file system loader, chokidar may become optional with nunjucks in the future) and to a lesser extent, the lack of a runtime only build that works for with node or umd.
Possibly it's doable as a node only target, but I think UMD is the correct approach.
In the event the nunjucks library becomes UMD compatible, this project will to.
from nunjucks-loader.
Hmm, that's not good - do you have a 1.x version of nunjucks installed?
throwOnUndefined
was added in 2.x - maybe your templates depend on newer features?
FYI - old 1.x nunjucks docs: https://github.com/mozilla/nunjucks/tree/9e0b4f0bf614e7b63cdb60c4bdd364d06c6246a5/docs
from nunjucks-loader.
1.0.7 version gives me this error:
ERROR in ./src/components/page/template.njk
Module build failed: TypeError: Cannot read property 'throwOnUndefined' of undefined
at Object.module.exports.compile (/home/felixsanz/Desktop/test/node_modules/nunjucks/src/compiler.js:1157:40)
at Object.module.exports (/home/felixsanz/Desktop/test/node_modules/nunjucks-loader/index.js:52:40)
@ ./src/components/page/index.js 91:16-41
from nunjucks-loader.
Related Issues (20)
- 2.4.6 breaks webpack builds HOT 3
- Version 2.4.7 broke compatibility HOT 2
- webpack2 support HOT 1
- Doesn't work with extract-text-webpack-plugin
- opts key for query not working HOT 2
- DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic HOT 2
- Can't add custom filters and extensions
- -v HOT 1
- Is this usable to inject script tags ? HOT 1
- Configurable `autoescape` is still enabled in browser environment HOT 2
- Create 4x branch HOT 8
- Cannot read property 'context' of undefined HOT 2
- webpack 4.x release HOT 2
- Options are not being passed to browser environment
- Images handling in nunjucks template
- Load config file via webpack loaders HOT 3
- Can't get Nunjucks loader working in Vue JS HOT 7
- Relative paths are not being resolved HOT 2
- Inline svg loader returns [object Object] HOT 1
- Vulnerabilitie in loader-utils.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nunjucks-loader.