denoland / std

The Deno Standard Library
https://jsr.io/@std
MIT License
2.99k stars 596 forks source link

suggestion: add guide on how to use the Standard Library in the browser #4586

Open iuioiua opened 4 months ago

iuioiua commented 4 months ago

In other words, how to transpile and bundle code for the browser. This should:

  1. Be in the README.md.
  2. Include appropriate snippets using deno_emit. This may require further work in deno_emit. See https://github.com/denoland/deno_emit/issues/167.
  3. Note any considerations one must make when doing so. E.g. a source file must contain the browser-compatible declaration. See https://github.com/denoland/deno_std/blob/main/_tools/check_browser_compat.ts.
kt3k commented 4 months ago

I think we should recommend esbuild with esbuild-deno-loader instead of deno_emit for bundling as deno_emit is no longer actively maintained. (esbuild-deno-loader already supports jsr:)