Skip to content

Commit

Permalink
docs: clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Feb 14, 2023
1 parent 9744823 commit 0f8ece9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ If you're importing a component from your node_modules folder, and that componen
}
```

...then this plugin together with `@rollup/plugin-node-resolve` will ensure that your app imports the *uncompiled* component source code. That will result in a smaller, faster app (because code is deduplicated, and shared functions get optimized quicker), and makes it less likely that you'll run into bugs caused by your app using a different version of Svelte to the component.
...then this plugin together with `@rollup/plugin-node-resolve` (and its `exportConditions` option containing the `'svelte'` condition) will ensure that your app imports the *uncompiled* component source code. That will result in a smaller, faster app (because code is deduplicated, and shared functions get optimized quicker), and makes it less likely that you'll run into bugs caused by your app using a different version of Svelte to the component.

Conversely, if you're *publishing* a component to npm, you should ship the uncompiled source (together with the compiled distributable, for people who aren't using Svelte elsewhere in their app) and include the `"svelte"` property in the `exports` of your `package.json`.

Expand Down

0 comments on commit 0f8ece9

Please sign in to comment.