Skip to content

[Feature requested] It is very necessary to add NPM package to create links on jsDelivr, unpkg or Skypack #86

Description

@ivan-enzhaev

It is very necessary to add NPM package to create links on jsDelivr, unpkg or Skypack.

It should support ES-module (ESM) like it was made for @box2d/core: https://www.npmjs.com/package/@box2d/core

    <!-- Since import maps are not yet supported by all browsers, its is
        necessary to add the polyfill es-module-shims.js -->
    <script async src="https://unpkg.com/es-module-shims@1.7.3/dist/es-module-shims.js"></script>

    <script type="importmap">
        {
            "imports": {
                "@box2d/core": "https://cdn.skypack.dev/@box2d/core@0.10.0",
                "gl-matrix": "https://cdn.jsdelivr.net/npm/gl-matrix@3.4.3/+esm"
            }
        }
    </script>

    <script type="module">
        import { b2Vec2 } from "@box2d/core";

        const vec = new b2Vec2(1, 2);
        console.log("vec =", vec);
    </script>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions