Skip to content

Npm Packages #13

@tevfiksirin

Description

@tevfiksirin

Hello, Thank you very much for sharing.
I'm about to publish a project :)
Since I am weak in javascript,
I want to ask a question about brads-boilerplate-theme-tailwind
I'm starting a new project, I want to use the swiper and glightbox packages.
In the previous project, I added and used it with traditional methods.
I don't know if there is a difference between methods, affecting performance vs. :)
It works when added as below in Sage 10.

import { Swiper, Navigation, Pagination, Scrollbar, EffectCoverflow, Thumbs } from 'swiper';
Swiper.use([Navigation, Pagination, Scrollbar, EffectCoverflow, Thumbs]);
import GLightbox from 'glightbox';
import 'flowbite';

var swiper = new Swiper(".mySwiper", {
  speed: 600,
  parallax: true,
  pagination: {
    el: ".swiper-pagination",
    clickable: true,
  },
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
});

const lightbox = GLightbox({
  selector: '.glightbox',
    touchNavigation: true,
    loop: true,
    autoplayVideos: true
});


For different reasons, I don't want to use sage.
In this project, how can we import npm packages.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions