Pass data to pug using pug-html-loader (cannot read property of undefined)
问题 According to the readme of pug-html-loader, the loader accepts a data object which is being passed as part of the options to the template. While not available on the options within the pug API reference, a grunt plugin I've found (grunt-contrib-pug) uses the API the same way. I've specified the following options for the loader: loader: 'pug-html-loader', options: { pretty: true, exports: false, debug: !env.production, compileDebug: !env.production, cache: config.build.useCaching, doctype: