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

Replace package.json exports "import" by "default" #1957

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Replace package.json exports "import" by "default" #1957

merged 1 commit into from
Aug 29, 2022

Conversation

Tw1N88
Copy link
Contributor

@Tw1N88 Tw1N88 commented Aug 25, 2022

@dimsemenov
Copy link
Owner

Thanks, I'll test it. Hopefully, it'll help and won't break stuff.

@dimsemenov dimsemenov merged commit 1b74c5b into dimsemenov:master Aug 29, 2022
@Tw1N88 Tw1N88 deleted the patch-1 branch August 29, 2022 23:32
@alexcroox
Copy link

I think it did break things in Vue 2 + webpack:

image

@dimsemenov
Copy link
Owner

@alexcroox I'm not sure what's causing it on your side, possibly related to this. You can also check Vue example here - https://photoswipe.com/vue-image-gallery/

Also you can try using real paths instead, for example:

import PhotoSwipe from 'photoswipe/dist/photoswipe.esm.js'
import PhotoSwipeLightbox from 'photoswipe/dist/photoswipe-lightbox.esm.js'
import `photoswipe/dist/photoswipe.css`

If you have suggestions on how to fix, feel free to submit a pr or post more details.

@alexcroox
Copy link

alexcroox commented Mar 13, 2023

Thanks I'm now using using real paths, also had to get Nuxt 2 to transpile the dependancy because of the optional chaining in the esm/umd files:

transpile: ['photoswipe'],

https://nuxtjs.org/docs/configuration-glossary/configuration-build/#transpile

Up and running now thanks

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.

Using PhotoSwipe 5.3 with TypeScript
3 participants