Options¶
Configuration accepted by mjmlI18nextCompiler(options).
templatesDir(string, required): Absolute path to templates directory.partialsDir(string): Absolute path to Handlebars partials directory.mjmlOptions(object): Options passed tomjml()(e.g.,{ validationLevel: 'soft' }).localesDir(string, default"locales"): Base path to the locales folder.defaultLocale(string, default"en"): Fallback language.preload(string[]): Locales to preload.namespaces(string[], default["common"]): i18next namespaces.defaultNamespace(string, default"common"): Default i18next namespace.autoSubject(boolean, defaulttrue): Enable auto-subject using<subjectNamespace>:<template>.subject.subjectNamespace(string, default"emails"): Namespace used for auto-subject key lookup.force(boolean, defaultfalse): Recompile even ifmail.data.htmlexists.strict(boolean, defaultfalse): Throw on MJML errors; otherwise attachmail.data.mjmlErrors.helpers(Record): Additional Handlebars helpers. i18next(i18n): Pre-initialized instance; if provided, the FS backend is not added by the plugin.
TypeScript users can import MjmlI18nextOptions from the package.