-
Notifications
You must be signed in to change notification settings - Fork 12
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
Import error for SvelteKit #46
Comments
I also encountered this problem. I think you should add |
publint is really helpful for catching errors like these: https://publint.dev/copy-image-clipboard |
This was fixed in #45 by adding the missing @LuanEdCosta do you think we could get a new release? |
@LuanEdCosta it'd be super helpful to us if we could get a new release. Would you be able to help us out? |
Describe the bug
Importing this package in SvelteKit leads to warnings in development and to errors in production builds related to ES modules.
I've set up a demo where I've made the following changes from a new SvelteKit project:
npm install copy-image-clipboard
src/routes/+page.svelte
I've added basic code to check for image copy support:When running in development mode with
vite dev
I get the following warning:copy-image-clipboard 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. Forced re-optimization of dependencies
When creating a production build with
vite build
I get the following error:The text was updated successfully, but these errors were encountered: