Error: UMD and IIFE output formats are not supported for code-splitting builds.
See original GitHub issueI am following the example in the template provided after creating an app from the official svelte demo and I received the above ^ error when I set my rollup configuration file format to iife.
input: 'src/main.js', output: { sourcemap: true, format: 'iife', name: 'app', file: 'public/bundle.js' },
Or is this a rollup issue?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Why does Rollup complain about code-splitting when I am not ...
Why does Rollup accuse me of code-splitting? [!] Error: UMD and IIFE output formats are not supported for code-splitting builds.
Read more >rollup.js
Rollup allows you to write your code using the new module system, and will then compile it back down to existing supported formats...
Read more >Build Options - Vite
Note the build will fail if the code contains features that cannot be safely ... global variable and is required when formats includes...
Read more >Rollup Dynamic Import | Today-I-Learned
UMD and IIFE output formats are not supported for code -splitting builds. ... 参考方案:rollup-plugin-loadz0r,但是限制是AMD 模块。 Today-I-Learned is maintained ...
Read more >UMD and IIFE output formats are not supported for code ...
Invalid value "umd" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.问题修复 · 问题 · 原因 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is odd, I do not get this error using a Svelte template on my Linux machine. My dev builds load fine. Then I switched to my Windows laptop and get this error - nothing has changed. I thought maybe I needed to updated some npm modules or something - and did that, and it doesn’t change anything. Same error.
Update: solved it by adding this to the rollup config:
inlineDynamicImports: true,
@mspanish, Alhamdulillah, thank you very much for the clue, finally the error disappeared. To make it clearer, in the code below I will write the rollup.config.js section again, hopefully it’s easier to understand.
export default { input: ‘src/main.js’, output: { sourcemap: true, format: ‘iife’, name: ‘app’, file: ‘public/build/bundle.js’, inlineDynamicImports: true },