TheComputerM / svelte-materialify

A Material UI Design Component library for Svelte heavily inspired by vuetify.
https://svelte-materialify.vercel.app
MIT License
622 stars 83 forks source link

UMD and IIFE output formats are not supported for code-splitting builds. #204

Open claudiojulioferraz opened 3 years ago

claudiojulioferraz commented 3 years ago

Hi, I followed the advanced installation tutorial, but I get the following error:

[!] Error: UMD and IIFE output formats are not supported for code-splitting builds.

Why is this happening?

Florian-Schoenherr commented 3 years ago

update to version 0.3.9, it worked on my end :)

you're using a Slider, right?

Florian-Schoenherr commented 3 years ago

It works if you add inlineDynamicImports: true to output in rollup.config.js:

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

in sapper you would need to do this for server and client.

We'll either document this or find a better solution, for now this should work.

claudiojulioferraz commented 3 years ago

It worked. Thank you! But I am not yet using a Slider

Florian-Schoenherr commented 3 years ago

@claudiojulioferraz then import { Button } from "svelte-materialify/src"; should work without the above mentioned workaround. It might not work with import { Button } from "svelte-materialify";?

claudiojulioferraz commented 3 years ago

This solution also worked. But the other one seems to be cleaner. Thank you!