備忘録 gulp-pug-inheritanceのエラー対処
gulp-pug-inheritanceを使おうと思ったら次のようなエラーが出た。
Skip inheritances is not set. This may throw an error, if basedir is set to "." and pug-inheritance is resolving files also in package folders.
次のような感じ。
.pipe(pugInheritance({ basedir: './source/pug'}))
調べた。次のようなページを発見。
gulp-pug-inheritanceのbasedirの後ろにnode_modulesをスキップするような記述をする。
.pipe(pugInheritance({ basedir: './source/pug', skip: 'node_modules'}))
これで動くようになった。
なんだか無理やりな気もするけど、思い通りの動作になったので様子見。