Closed sinklair closed 5 years ago
This works fine if I revert to 4.1.2
This seems to be a problem with the way mjml is exporting the default method since 4.2.
You can temporarily fix this by changing line 2 in gulp.js to var mjmlEngine = require('mjml').default
The corresponding bug is referenced here: https://github.com/mjmlio/mjml/issues/1387
We did fix the .default on 4.2.1 try to remove it now
On 25 Nov 2018, at 01:49, Sakana Productions notifications@github.com wrote:
@Michael-wm using var mjmlEngine = require('mjml').default didn't work on a new install of mjml and gulp-mjml. Below is my gulpfile.js
var gulp = require('gulp'); var mjmlEngine = require('mjml').default; var mjml = require('gulp-mjml');
gulp.task('default', function(){ gulp.src('mjml/*.mjml') .pipe(mjml(mjmlEngine, {minify: true})) .pipe(gulp.dest('./output')) }) and my package.json
{ "name": "dm-emails", "version": "1.0.0", "main": "index.js", "license": "MIT", "dependencies": { "gulp": "^3.9.1", "gulp-mjml": "^3.0.0", "mjml": "4.2" } } — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Updated and works great. Thank you
Using a gulp task that was working fine up until I updated to MJML 4.2.0. Now I receive the following error if I keep 4.2 in the project
gulp.js looks likes this