Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support v4 console access #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattkhan
Copy link

@mattkhan mattkhan commented Nov 8, 2024

Problem

The latest version (4.1.0 at the time of this PR) cannot be loaded in the console via init("v4.1.0")

Solution

Before: the unkpg url would be appended with /esm/index.js regardless of the version
After: if the version starts with 4, append /index.js instead

  • same behavior for all versions that do not start with 4

Also defaults init() to use the current latest version.

Tested in Chrome locally

image

This should partially resolve #222

only partial because V3 is not supported

Alternatively, unpkg mentions:

If you omit the file path (i.e. use a “bare” URL), unpkg will serve the file specified by the unpkg field in package.json, or fall back to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The init() in documentation gives broken date-fns
1 participant