Skip to content

would you consider providing a pure es module? #3

@mreinstein

Description

@mreinstein

In my own projects, I'm starting to explore using absolute URLs with no package manager and no bundling step.

I'd love to be able to import segseg directly in my projects. For example:

import segseg from 'https://cdn.jsdelivr.net/gh/tmpvar/segseg@0.2.2/segseg.js'

where the file would basically just look like:

export default function segseg (out, p1, p2, p3, p4) {
    // ...
}

no legacy module systems, no window globals, just a plain old function that uses the new es module system. :)

A working example of this in one of my projects: https://cdn.jsdelivr.net/gh/mreinstein/collision-2d@master/src/segment-segment-overlap.js

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