We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, Here is a solution to using this library with vitejs as a bundler working with "vite": "^3.0.7"
"vite": "^3.0.7"
@rollup/plugin-replace
npm install @rollup/plugin-replace
vite.config.js
import { defineConfig } from "vite"; import relace from "@rollup/plugin-replace"; import { svelte } from "@sveltejs/vite-plugin-svelte"; export default defineConfig({ plugins: [ relace({ preventAssignment: true, values: { "from 'dayjs": "from 'dayjs/esm", }, }), svelte(), ], });
Now you can use the DatePicker
<script> import DatePicker from "@beyonk/svelte-datepicker/src/components/DatePicker.svelte"; </script>
The text was updated successfully, but these errors were encountered:
The issue with using dayjs/esm is that it breaks in SSR mode. It's a complex problem to fix.
Where have you experienced this failing?
My thoughts at the moment are to rip out dayjs entirely and use date-fns, since I think dayjs has a fair amount of esm issues.
date-fns
Sorry, something went wrong.
No branches or pull requests
Hello,
Here is a solution to using this library with vitejs as a bundler
working with
"vite": "^3.0.7"
Step by step
install
@rollup/plugin-replace
change your
vite.config.js
Now you can use the DatePicker
The text was updated successfully, but these errors were encountered: