ritz078 / embed-js

🌻 A lightweight plugin to embed emojis, media, maps, tweets, code and more. ✨
https://codesandbox.io/s/Wp5OlNMn
MIT License
1.27k stars 88 forks source link

Does not work on plain JS/jQuery #266

Closed M4sterZer0 closed 5 years ago

M4sterZer0 commented 6 years ago

Uncaught SyntaxError: The requested module 'https://unpkg.com/embed-js' does not provide an export named 'EmbedJS'

Source:

import {EmbedJS} from "https://unpkg.com/embed-js";
import {youtube} from "https://unpkg.com/embed-plugin-youtube";
import {twitter} from 'https://unpkg.com/embed-plugin-twitter';

var x = new EmbedJS({
    input: document.getElementById('myid'),
    plugins: [
        youtube({
            details: true,
            gAuthKey: 'KEY',
            height: 300
        })
    ]
});
x.render();
ritz078 commented 5 years ago

use it as import EmbedJS from "https://unpkg.com/embed-js".

It doesn't need jQuery.

But I would recommend you use it from npm if you can.