Krzysztof Mianowski

Konzeption-Screendesign-Development

WordPress full Image Lazy Loading solution including the images from the WYSIWYG backend editor.
November 22nd, 2020

Encountering content jumps may be very frustrating. Especially if your scroll event is being tracked and the size of your Document doesn’t get updated after an element got loaded into the DOM. It’s pretty easy to handle images in your template and manipulate them to behave as expected. But what to do with the WYSIWYG images? […]

Browserify Transform Error : ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’
August 30th, 2019

This error hit me when i was trying to use Swiper’s custom build. In my gulp setup I make use of browserify and babelify like this: gulp.task(‘js’, (done) => { browserify(‘./src/js/main.js’, {debug:true}) .transform(‘babelify’, { presets: [‘@babel/preset-env’] }) //transpile es6 to es2015 .bundle() .on(‘error’, gutil.log.bind(gutil, ‘Browserify Error’)) .pipe(source(‘bundle.js’)) .pipe(buffer()) .pipe(sourcemaps.init({loadMaps: true})) .pipe(mode.development(uglify())) .pipe(mode.local(uglify())) .pipe(mode.production( uglify({ compress: { drop_console: true […]