Home

Issue: 1251

how to new a Obj from static js file not import

[issue link]

I add a swiper.min.js as the doc How to use external resources? and i need new a swiper obj (simply the code ) like below :

 export default {
head: {
      script: [
        { src: '/swiper/swiper.min.js' }
      ],
      link: [
        { rel: 'stylesheet', href: '/swiper/swiper.min.css' }
      ]
    },
  mounted () {
       // simply the code
        new Swiper('.swiper-container', {
          pagination: '.swiper-pagination',
          loop: true
        })
    },
}

then the console show error like this:
image

why canโ€™t i use import the swiper file please check #1250
thank for some one to solve my problem ๐Ÿ˜ƒ

This question is available on Nuxt.js community (#c1108)