cloudinary / cloudinary-svelte

Cloudinary components library for Svelte
MIT License
17 stars 3 forks source link

Fix ssr by packaging src & point svelte to src in package.json #8

Closed ghost closed 3 years ago

ghost commented 3 years ago

Brief Summary of Changes

This pr fixes the ssr issue raised in #2 by updating two values in package.json { "svelte": "src/index.js", <- This has to point to the source code, otherwise sapper cannot compile. "files": ["dist", "src"] <- Also include src in package }

Reviewer, please note:

  1. See comments in related issue
  2. I've also updated rollup plugins and tested dist using the included example app, which imports from dist.
  3. Sapper is an app framework built on top of Svelte. It's used to build ssr svelte apps. BTW, sapper is going to be replaced by SvelteKit, which is a rewrite of Sapper. See https://svelte.dev/blog/sveltekit-beta

Checklist: