I am using the Rollup Sapper template: https://github.com/sveltejs/sapper-template-rollup/blob/master/rollup.config.js. It has three properties on the default export of rollup.config.js
: client
, server
, and serviceworker
. If I install a plugin, how do I know which of these properties to list the plugin under? If you could point me to an article or something that explains the ins and outs of how Sapper works, that would probably help too.
Sapper builds your main app twice (once for the server, once for the client). So in most cases, if you install a plugin that transforms the app in some way, you'll need to use it with both server and client configs.
Beyond that, it's basically common sense — if you're transforming your service worker code in some way, then you'll need to add the plugin to your service worker config.