Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

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

Open
claudiojulioferraz opened this issue Apr 4, 2021 · 5 comments

Comments

@claudiojulioferraz
Copy link

claudiojulioferraz commented Apr 4, 2021

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
Copy link
Collaborator

Florian-Schoenherr commented Apr 4, 2021

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

you're using a Slider, right?

@Florian-Schoenherr
Copy link
Collaborator

Florian-Schoenherr commented Apr 4, 2021

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
Copy link
Author

claudiojulioferraz commented Apr 4, 2021

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

@Florian-Schoenherr
Copy link
Collaborator

@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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants