View difference between Paste ID: zBa3NTnw and bAKbaYkF
SHOW: | | - or go back to the newest paste.
1
import "./product.css";
2
3
document.addEventListener('DOMContentLoaded', event => {
4
  
5
  if (document.querySelector('.js-product__gallery')) {
6-
    import('./js/product-gallery').then(module => {
6+
    let galeryImport = import('./js/product-gallery')
7
    galeryImport.then(module => {
8
      new module.default();
9
    })
10
  }
11
  
12-
    import('./js/product-tint').then(module => {
12+
13
    import('./js/product-tint').then(async module => {
14
      new module.default();
15
      let {default: galery} = await galeryImport
16
      new galery()
17
    })
18
  }
19
  
20
});