Pug plugin for resolving templates in node_modules
npm install pug-plugin-modules
Import plugin:
const modulesPlugin = require('pug-plugin-modules');
then, in your Pug options object:
{
plugins: [
modulesPlugin(/*options*/)
]
}
The same options as resolve are available. PugPluginModules provides the following defaults:
baseDir
= directory of source fileextensions
=['.pug', '.jade']
packageFilter
= will first search for"pug"
and then"main"
inpackage.json