const blankImage = 'data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA=';

let inited = false;
/* eslint-disable */
function initEchoIfNeed(option) {
  if (inited) {
    return;
  }

  // FIXME: this problem just occurs in development mode.
  // asynchronously requiring 'echo-js' is another solution for umd style package.
  const echo = require('imports-loader?define=>false!echo-js')(window);
  echo.init(option);
  inited = true;
}


export default {
  install(Vue, option) {
    Vue.directive('lazy', {
      bind(el, binding, vnode, oldVnode) {
        initEchoIfNeed(option);
        const src = el.src;
        el.src = blankImage;
        if (binding.modifiers.background) {
          e.setAttribute('data-echo-background', src);
        } else {
          el.setAttribute('data-echo', src);
        }
      },
    });
  },
};


@@ -434,16 +434,125 @@
 ue;%0A%7D%0A%0A%0A
+// TODO: implement%0A// v-lazy, v-lazy.bg used for image%0A// v-lazy:loader='loader function' used for component%0A
 export d

add implementation note for v-lazy