popper.js in bootstrap 4 gives SyntaxError Unexpected token export

前端 未结 6 1039
無奈伤痛
無奈伤痛 2020-12-04 16:15

I tried install bootstrap 4, and included following links




        
6条回答
  •  情深已故
    2020-12-04 16:35

    I encountered the same issue if I use popper.js from CDN network like cdnjs.

    If you observe the source code of Bootstrap 4 examples like for example Navbar you can see that popper.min.js is loaded from:

    
    

    I included that in my project and the error is gone. You can download the source code from

    https://getbootstrap.com/docs/4.1/assets/js/vendor/popper.min.js
    

    and include in your project as a local file and it should work.

提交回复
热议问题