nodemailer-express-handlebars icon indicating copy to clipboard operation
nodemailer-express-handlebars copied to clipboard

Unable to use custom extension for partials

Open nazmirket opened this issue 2 years ago • 3 comments

When I use a custom file extension with settings below

hbs({
		viewEngine: {
			extName: '.hbs',
			defaultLayout: false,
			partialsDir: PartialsDir,
		},
		viewPath: TemplateFolder,
		extName: '.hbs',
	})

My partials with .hbs extension are not resolved. I think custom extension should also be applied to partials.

For anyone who is having the same problem, just name your partials with .handlebars extension

nazmirket avatar Feb 21 '23 23:02 nazmirket

I believe this is an issue with express-handlebars. Please open an issue with that project.

yads avatar Mar 06 '23 19:03 yads

i think this error is coming from nodemailer-express-handlebars----- Error: The partial header could not be found

rosselpha avatar Mar 07 '23 03:03 rosselpha

nodemailer-express-handlebars may be in the stack trace, but the error is coming from further down the toolchain. This extension does not configure partials. That is handled by your express-handlebars configuration which you either instantiate directly or pass as the optionset viewEngine.

On Mon, Mar 6, 2023, 8:33 PM rosselpha @.***> wrote:

i think this error is coming from nodemailer-express-handlebars----- Error: The partial header could not be found

— Reply to this email directly, view it on GitHub https://github.com/yads/nodemailer-express-handlebars/issues/60#issuecomment-1457460765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEAYZZZFIWRV23EY7IHXKTW22UBRANCNFSM6AAAAAAVDUOUIM . You are receiving this because you commented.Message ID: @.***>

yads avatar Mar 07 '23 04:03 yads