captbaritone / captbaritone/webamp

Importing Webamp from bundle inside a module

Open
#1,239 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
796
PR merge metrics
No merged PRs in 30d

Description

The [readme](https://github.com/captbaritone/webamp/blob/master/packages/webamp/docs/usage.md) mentions how to get started with Webamp in two situations: minimal, and with webpack.

As I mentioned on Discord, the example links are actually 404, so I'm not sure what they look like. But there's a tertiary option that might be mentioned: minimal, but with a `` tag. In this case, you need to `import()` Webamp:

```html
<script type="module">
await import('./webamp.bundle-1.5.0.js')

const container = document.querySelector('#container')
const webamp = new Webamp()
await webamp.renderWhenReady(container)

```

It might be worth mentioning this since it's otherwise not totally straightforward how to use the bundle file in an environment where a module is required.

Contributor guide

No contributing guide indexed for this repository

Research direction

Update packages/webamp/docs/usage.md; first read the existing minimal and webpack usage sections and check the example links mentioned in the issue. Add the module-script import case and ensure the documented examples no longer point to 404 links.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.