{
// nunjucks template loader.
test: /\.html$/, use: [{
loader: 'nunjucks-loader',
query: {
opts: {
autoescape: true, // escape dangerous characters.
trimBlocks: true, // automatically remove trailing newlines from a block/tag
lstripBlocks: true, // automatically remove leading whitespace from a block/tag
web: {
useCache: true // will enable cache and templates will never see updates.
}
},
config: __dirname + '/assets/js/common/nunjucks.config.js'
},
}]
},
my nunjucks.config.js;
const moment = require('moment/min/moment-with-locales.min.js');
module.exports = function (env) {
// add moment to client side nunjucks too.
env.addGlobal('moment', moment); // eslint-disable-line no-undef
console.dir(env);
}
and i see on browser that these settings are not applied to env;
for webpack2 i have the following config;
my nunjucks.config.js;
and i see on browser that these settings are not applied to env;
any ideas?