-
Notifications
You must be signed in to change notification settings - Fork 273
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
ES Module #134
Comments
The built file is not a module at all. There are no exports of any kind. It is a standalone script that needs to get dropped into the page and then used. I'm sure on the specifics of what Sveltkit is doing and how you're trying to use it. Seems like a problem with the way you're trying to import the script into something else when it isn't feasible. Maybe a bare import would work, but that would still confuse a compiler most likely. |
Used this successfully with Svelte: https://github.com/zamanruhy/svelte-lite-youtube-embed |
Duping this into #1 The most obvious ways to publish this on NPM in a way that's bundler friendly result in sacrificing the web performance details. The most obvious part: The CSS should be bundled into your CSS.. it should not be added via clientside javascript. The svelte port (and other frameworky ports) generally publish this is a more friendly way (that probably is slightly worse for performance.) Using them seems alright. :) |
Hi guys I am using sveltekit and lite-youtube-embed but I am getting the following error when I launch
pnpm run dev
. I don't know much of cjs and ES module. I am opening this issue to report the problem and hopefully somebody competent can handle it.lite-youtube-embed doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
lite-youtube-embed works more or less in dev mode but not in production.
The text was updated successfully, but these errors were encountered: