diff --git a/README.md b/README.md index 5c1d1e7..333981f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,24 @@ A small date picker built with Svelte 3. Demo available here: [view docs and exa npm i -D svelte-calendar ``` +## Usage within svelte-kit project + +When using this component within a svelte-kit application it is necessary to add its two dependencies (`just-throttle` and `dayjs`) to the `config.kit.vite.optimizeDeps.include` array in `svelte.config.js`. Eg: your config should include the following: + +```js +const config = { + kit: { + vite: { + optimizeDeps: { + include: ['just-throttle', 'dayjs'] + } + } + } +}; + +export default config; +``` + ## Features - Day, Month & Year pickers diff --git a/svelte.config.js b/svelte.config.js index 3ad99f1..3e0fa80 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -22,9 +22,6 @@ const config = { assets: 'docs', fallback: null }) - // package: { - // emitTypes: false - // } }, preprocess: [ replace([