ghostdevv / svelte-copy

A svelte action to copy text on click!

Home Page:https://svelte-copy.pages.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug on production!

ErcouldnT opened this issue · comments

Must use import to load ES Module: /var/task/node_modules/svelte-copy/index.js
require() of ES modules is not supported.

I thought this was fixed, where are you deploying to? @ErcouldnT

also what version are you on, should be on 1.2.4

I'm deploying to Netlify. I installed it through npm install. How can I fix it?

So this isn't a issue with svelte-copy - currently the netlify adapter defaults to cjs instead of esm. I escalated that and should hopefully be resolved or documented soon

You can add this to your netlify.toml to fix the issue:

[functions]
node_bundler = 'esbuild'

Thank you. This fixed my problem.