From 2e54c448b3fa0f606a33a492c8961142b0f355ab Mon Sep 17 00:00:00 2001 From: Conduitry Date: Mon, 1 Jul 2019 07:14:58 -0400 Subject: [PATCH] readme: adjust external components explanation to include Rollup --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31524bc..491cded 100644 --- a/README.md +++ b/README.md @@ -72,11 +72,11 @@ now ``` -## Using external components with webpack +## Using external components When using Svelte components installed from npm, such as [@sveltejs/svelte-virtual-list](https://github.com/sveltejs/svelte-virtual-list), Svelte needs the original component source (rather than any precompiled JavaScript that ships with the component). This allows the component to be rendered server-side, and also keeps your client-side app smaller. -Because of that, it's essential that webpack doesn't treat the package as an *external dependency*. You can either modify the `externals` option under `server` in [webpack.config.js](webpack.config.js), or simply install the package to `devDependencies` rather than `dependencies`, which will cause it to get bundled (and therefore compiled) with your app: +Because of that, it's essential that the bundler doesn't treat the package as an *external dependency*. You can either modify the `external` option under `server` in [rollup.config.js](rollup.config.js) or the `externals` option in [webpack.config.js](webpack.config.js), or simply install the package to `devDependencies` rather than `dependencies`, which will cause it to get bundled (and therefore compiled) with your app: ```bash npm install -D @sveltejs/svelte-virtual-list