chocolateboy/parcel-plugin-nunjucks

Nunjucks configuration file is Ignored

Javiani opened this issue · 1 comments

Hi!

First of all thank you for the configuration support! Now I fell like I can use in production because there's no limitations.

Unfortunately, I did set that nunjucks configuration file (nunjucks.config.js) in the root of my project and I tried to add some global variable just to test that new feature. But it seems to ignore that configuration file and nothing happens. The global variable is empty and template does not display the value... I don't have a clue why is not loading those configurations.

nunjucks.config.js
`const nunjucks = require('nunjucks')
const env = nunjucks.configure('./src')

module.exports = {
env,
data :{ name: 'It is working!' }
}
`

layout.njk
...
<title>Boilerplate - Light | {{name}}</title>

Name is empty

The version of this module available on NPM didn't include config-file support when you tried it. It was only released in February.