Commit 4377108
committed
Always use ESM version of YAML
We were using the url `https://esm.sh/yaml@2.2.1` as the yaml module,
however, it appears that `esm.sh` detects the user agent that is
downloading and serves different versions of the assets based on it,
so in this case, it was actually getting a special Deno bundle of the
`yaml` package that included a bunch of Deno/NodeJS shims. However,
when we were bundling for the website, this is not appropriate at all,
which is why it was receiving a `ReferenceError: Deno is undefined`
You can tell `esm.sh` the target of your platform directly by setting
the `target`. This results in a much smaller dependency set, and one
that works in the browser. We don't use the file system at all, so
there is no need to use anything but the ESM build of `yaml`1 parent 4b011ea commit 4377108
2 files changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments