Skip to content
New issue

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

fix(dayjs): use CJS instead of ESM #22

Merged
merged 2 commits into from
Jun 19, 2022
Merged

fix(dayjs): use CJS instead of ESM #22

merged 2 commits into from
Jun 19, 2022

Conversation

metonym
Copy link
Owner

@metonym metonym commented Jun 19, 2022

This is actually a second attempt at #13.

It uses the CJS build for dayjs, so vite/SvelteKit can optimize the dependency. The reason #13 was reverted because it stopped working with Snowpack.

I'll publish this under a next tag and play around with it. Even if it does break Snowpack, I think it's more important to unblock vite/SvelteKit usage.

@metonym
Copy link
Owner Author

metonym commented Jun 19, 2022

Tested this with rollup/webpack/vite/SvelteKit/sapper and they all work.

Snowpack dev works but fails at build:

Duplicate export 'default' in dayjs.min.js

I'm going to release this (removing the next tag) since it's more important to unblock SvelteKit usage.

@metonym metonym merged commit 5d670ef into master Jun 19, 2022
@metonym metonym deleted the use-cjs branch June 19, 2022 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant