template icon indicating copy to clipboard operation
template copied to clipboard

IIFE vs ES output format

Open xiaohk opened this issue 4 years ago • 0 comments

Hello, right now the default output format is iife in the rollup configuration. I am wondering if iife is recommended for Svelte projects comparing to the es module format? I can make the es format work if I add a type='module' in the index.html, but I am not sure about the pros and cons of these two formats.

https://github.com/sveltejs/template/blob/4fd09c2a191b017ca9eb9cb9921fa873e95f44b4/rollup.config.js#L35

xiaohk avatar Dec 10 '21 17:12 xiaohk