skypackjs / skypack-cdn

An issue tracker for the CDN
107 stars 5 forks source link

Named exports are not present when there are both a default export and named exports #289

Open mmomtchev opened 2 years ago

mmomtchev commented 2 years ago
import geotiff from 'https://cdn.skypack.dev/geotiff';
console.log(geotiff);   // The default export is there
console.log(geotiff.fromUrl); // Not there

(open in CodePen from https://www.skypack.dev/view/geotiff)

The named exports seem to be dropped by the rollup plugin here: (from: https://cdn.skypack.dev/-/geotiff@v2.0.5-fvrHsGksXrb9i1TTNcj6/dist=es2019,mode=imports/optimized/geotiff.js)

function getDefaultExportFromCjs(x) {
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
var geotiff$1 = /* @__PURE__ */ getDefaultExportFromCjs(geotiff);