我正在使用 git Repo 的克隆:https ://github.com/jpagano/mjml-starter-base
如何添加此处找到的配置选项https://www.gitmemory.com/issue/mjmlio/mjml/1528/467101657
config.juicePreserveTags='{"imgTag": { "start": "<img", "end": "/>" }, "brTag": { "start": "<br", "end": "/>" }}'
我试过了:
export function buildMjml() {
const options = {
beautify: true,
minify: false,
keepComments: false,
juicePreserveTags: '{"imgTag": { "start": "<img", "end": "/>" }, "brTag": { "start": "<br", "end": "/>" }}',
};
return gulp.src(PATHS.mjml.src).pipe(mjmlGulp(mjml, options)).pipe(gulp.dest(PATHS.dist));
}
但这不会将结束标签添加到 image 和 br 标签