← 输入框|github.com|刷新
Skip to content

ES modules #102

Closed
Closed

Description

@zigomir

Now that Safari and Chrome already support ES modules natively, it would be nice if one could import this library like so

import hyper, { wire } from 'https://unpkg.com/hyperhtml@latest/min.js'

I'm aware that current setup with uglify-js doesn't support ES6 syntax yet. There might be other issues too. I'm mostly curious if this is something you'd consider adding or it isn't something worth adding or not really?

Activity

  1. added a commit that references this issue on Sep 9, 2017
  2. WebReflection commented on Sep 9, 2017

    @WebReflection
    Owner

    you can see exports here:
    1e81342#diff-39e956f0c2d414da37239d9a1bce0f3aR4

    and you can test the browser here:
    https://webreflection.github.io/hyperHTML/test/mjs.html

    I need to double check about unpkg because I also use their cdn a lot but it's apparently not serving the correct mime-type like GitHub does.

    TL;DR the package is the exact same but it now contains the ugly .mjs files since this is apparently how things are done these days.

  3. WebReflection commented on Sep 9, 2017

    @WebReflection
    Owner

    Follow up as PR:
    unpkg/unpkg#65

  4. zigomir commented on Sep 9, 2017

    @zigomir
    Author

    Ah, I see now, thanks! [edit] oh wow, that was actually done as new version, nice! :)

  5. WebReflection commented on Sep 12, 2017

    @WebReflection
    Owner

    oh wow, that was actually done as new version

    Oh yes, I forgot to mention I pushed changes to make your request happen.

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