Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit de11733

Browse files
authored
Merge pull request #4157 from gibkigonzo/bugfix/lazy-load-carousel
add lazy load for vue-carousel
2 parents d0f1116 + a55462b commit de11733

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Remove preload font - it gives good performance, but vue-meta refresh page, beca
3939
- Add onlyPositive prop to BaseInputNumber to not allow user type negative value - @Michal-Dziedzinski (#4136)
4040
- Await for cart/authorize while login user - @gibkigonzo (#4133)
4141
- Fixed `NOT_ALLOWED_SSR_EXTENSIONS_REGEX` to only match with file extensions having a dot - @haelbichalex (#4100)
42+
- Add lazy load for vue-carousel - @gibkigonzo (#4157)
4243

4344
## [1.11.1] - 2020.02.05
4445

src/themes/default/components/core/ProductGalleryCarousel.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545

4646
<script>
4747
import config from 'config'
48-
import { Carousel, Slide } from 'vue-carousel'
4948
import ProductImage from './ProductImage'
5049
import ProductVideo from './ProductVideo'
5150
import reduce from 'lodash-es/reduce'
@@ -54,8 +53,8 @@ import map from 'lodash-es/map'
5453
export default {
5554
name: 'ProductGalleryCarousel',
5655
components: {
57-
Carousel,
58-
Slide,
56+
'Carousel': () => import('vue-carousel').then(Slider => Slider.Carousel),
57+
'Slide': () => import('vue-carousel').then(Slider => Slider.Slide),
5958
ProductImage,
6059
ProductVideo
6160
},

src/themes/default/components/core/ProductGalleryZoomCarousel.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
</template>
5252

5353
<script>
54-
import { Carousel, Slide } from 'vue-carousel'
5554
import { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock'
5655
import ProductImage from './ProductImage'
5756
import ProductVideo from './ProductVideo'
@@ -81,8 +80,8 @@ export default {
8180
}
8281
},
8382
components: {
84-
Carousel,
85-
Slide,
83+
'Carousel': () => import('vue-carousel').then(Slider => Slider.Carousel),
84+
'Slide': () => import('vue-carousel').then(Slider => Slider.Slide),
8685
ProductImage,
8786
ProductVideo
8887
},

0 commit comments

Comments
 (0)