skypackjs / skypack-cdn

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

Import started picking up node version of a module / "browser" export is ignored #361

Open Inviz opened 1 year ago

Inviz commented 1 year ago

Hello. We've been using skypack for a while on codepen, and it started failing recently. Investigation shows that skypack picks conditional export meant for server.

Imported file is @sitecore-feaas/clientside/react.

Here's what export looks like:

    "./react": {
      "localhost": "./build/ui/react.js",
      "types": "./types/ui/react.d.ts",
      "browser": "./dist/browser/react.esm.js",
      "import": "./dist/node/react.esm.js",
      "require": "./dist/node/react.cjs",
      "default": "./dist/node/react.esm.js"
    },

So the served file tries to import node:vm package, is only imported on the server version of a file. browser export is ignored by skypack. It was not the case before.

Any ideas?

Inviz commented 1 year ago

@FredKSchott is skypack maintained? Trying to evaluate if it's worth waiting for a fix, or i should be migrating away.

The issue at hand seems to be like a serious regression which only started happening recently... so i guess that is related to some changes? is there a better channel to connect to the developers?

We are using skypack in code examples generated on codepen.

soegaard commented 11 months ago

@FredKSchott

An official statement of what to expect with regards to Skypack would be classy. Leaving things hanging like this, results in inconvenience at best for too many people.

I understand that it is hard to close down a project ( even temporarily), but it might be the best thing to do at the moment.

FWIW I enjoyed using Skypack for a long time and would have liked it to succeed.

Inviz commented 11 months ago

We moved to jsdelivr which offers similar functionality now.