angular-hmr icon indicating copy to clipboard operation
angular-hmr copied to clipboard

npm package 1.2.2 content does match github content

Open mike-packetwerk opened this issue 7 years ago • 1 comments

Inside 1.2.2 https://registry.npmjs.org/@angularclass/hmr/-/hmr-1.2.2.tgz src/helpers.ts

// Hot Module Replacement
export function bootloader(main: any) {
  if (document.readyState === 'complete') {
    main()
  } else {
    document.addEventListener('DOMContentLoaded', main);
  }
}

On github: https://github.com/AngularClass/angular2-hmr/blob/master/src/helpers.ts#L1

Looks like the packaging system is broken?

mike-packetwerk avatar Feb 23 '17 13:02 mike-packetwerk

Im having the exact problem. This is breaking on iOS9 and some Android devices, while the Github content don't break when I copy them over. for now Im going to patch this manually until a new release goes out.

This line doesn't fire:

document.addEventListener('DOMContentLoaded', main);

While this works:

document.addEventListener('DOMContentLoaded', () => main());

sallar avatar Mar 20 '17 12:03 sallar