beynar / svelte-dropzone

A simple & ssr ready wrapper around dropzone.JS for svelte/sapper.
35 stars 10 forks source link

Rollup error #2

Open astanet opened 5 years ago

astanet commented 5 years ago

I tried to use this component as described on README.md. But, rollup showed me a error below. [!] Error: UMD and IIFE output formats are not supported for code-splitting builds. My rollup config is from svelte-template. https://github.com/sveltejs/template I cannot figure out this problem, but I can still learn from your code. Thank you.

AdamT213 commented 5 years ago

I am encountering this issue as well. Tried including the package as a dev dependency so that it would be bundled by the app, but that did not work @astanet did you find a solution?

ghyath5 commented 4 years ago

Same here any solution ?

jsparedes commented 4 years ago

In rollup.config.js you need to add inlineDynamicImports: true

export default {
  input: 'src/main.js',
  inlineDynamicImports: true,
    output: {
      sourcemap: true,
      format: 'iife',
      name: 'app',
      file: 'public/build/bundle.js'
    },
  ......
}

Source: mspanish comment