Document DatePicker usage with a Rollup set-up (#990)

* chore(example): add inlineDynamicImports: true

* docs(date-picker): add note for using DatePicker with Rollup

Closes #986
This commit is contained in:
Eric Liu 2022-01-10 12:03:14 -10:00 committed by GitHub
commit 01a548fee0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -3,7 +3,7 @@ components: ["DatePicker", "DatePickerInput", "DatePickerSkeleton"]
--- ---
<script> <script>
import { DatePicker, DatePickerSkeleton, DatePickerInput } from "carbon-components-svelte"; import { DatePicker, DatePickerSkeleton, DatePickerInput, InlineNotification } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte"; import Preview from "../../components/Preview.svelte";
</script> </script>
@ -63,6 +63,15 @@ components: ["DatePicker", "DatePickerInput", "DatePickerSkeleton"]
### Single ### Single
<InlineNotification
svx-ignore
lowContrast
title="Note:"
subtitle="If using Rollup, specify `inlineDynamicImports: true` in your `rollup.config.js`."
kind="info"
hideCloseButton
/>
<FileSource src="/framed/DatePicker/DatePickerSingle" /> <FileSource src="/framed/DatePicker/DatePickerSingle" />
### Range ### Range

View file

@ -9,6 +9,7 @@ const production = !process.env.ROLLUP_WATCH;
export default { export default {
input: "src/index.js", input: "src/index.js",
inlineDynamicImports: true,
output: { output: {
sourcemap: !production, sourcemap: !production,
format: "iife", format: "iife",