lit-analyzer icon indicating copy to clipboard operation
lit-analyzer copied to clipboard

Make the VSCode plug-in compatible with https://vscode.dev and https://github.dev

Open FluorescentHallucinogen opened this issue 4 years ago • 4 comments

Please make the VSCode plug-in compatible with https://vscode.dev and https://github.dev.

screenshot

More info:

  • https://aka.ms/vscode-web-extensions-guide
  • https://code.visualstudio.com/api/extension-guides/web-extensions

FluorescentHallucinogen avatar Dec 05 '21 13:12 FluorescentHallucinogen

@runem @rictic @FelixSchuSi @justinfagnani @43081j @abdonrd Any update for the solution of this issue? Please consider this as DX improvement and give some priority for it. Thanks

beingminimal avatar Apr 24 '22 11:04 beingminimal

I'll take a look this week if I can.

Peter already added a bundle to the plugin so I think the things preventing it from being used in the web runtime are:

  • some missing package metadata
  • remove all dependency on the node standard lib

Not sure how feasible that last one is off the top of my head. I feel like we will use it in various places for filesystem interaction but could maybe stub it out or feature detect it.

43081j avatar Apr 24 '22 11:04 43081j

To see what and where they're used, set minify to false in esbuild.script.mjs and grep through built/**/*.js for require.

I wonder if we could publish a build that uses web safe replacements for 'fs', 'path', 'url' etc. Even better if it tries to require them and falls back to the bundled web safe versions, then we could just have one build.

rictic avatar Apr 24 '22 15:04 rictic

👍 and yeah the vsc docs suggest the 'easy route' is to just webpack (in their case) a browser specific bundle where they've replaced the node libraries with web versions/polyfills.

ill try out what you said and see what kind of state we're in

43081j avatar Apr 25 '22 08:04 43081j