thecodejack / svelte-file-dropzone

Svelte component for fileupload
https://svelte-file-dropzone.netlify.app/
252 stars 45 forks source link

Module not found attr-accept #157

Closed gponty closed 8 months ago

gponty commented 9 months ago

Hi,

I use webpack and i have this error when i compile :

Module build failed: Module not found:
"./node_modules/svelte-file-dropzone/dist/utils/index.js" contains a reference to the file "./attr-accept".
This file can not be found, please check it for typos or update it if the file got moved.

Then this file exist : image

Any idea ? Thank you

PPP01 commented 8 months ago

Same problem here, with webpack too.

for webpack (not sure about vite, snowpack and other build tools) the relative specifiers need the .js extension (AFAIK)

--- a/svelte-file-dropzone/dist/utils/index.js
+++ b/svelte-file-dropzone/dist/utils/index.js
@@ -1,4 +1,4 @@
-import accepts from "./attr-accept";
+import accepts from "./attr-accept.js";
unlocomqx commented 7 months ago

Fix for webpack

https://github.com/webpack/webpack/issues/16660