未捕获的语法错误:意外的令牌导出 - popper.js 错误

Raj*_*ath 1 javascript bootstrap-4 angular popper.js angular7

Angular 给出了错误: bootstrap 4 中的 popper.js 给出了 SyntaxError Unexpected token export

我从浏览器控制台收到此错误。

即使我更改了 popper.min.js 位置引用但没有用..

node_modules/popper.js/dist/umd/popper.min.js

node_modules/popper.js/dist/ems/popper.min.js

Angular.json

    "scripts": [
      "node_modules/bootstrap/dist/js/bootstrap.min.js",
      "node_modules/jquery/dist/jquery.slim.min.js",
      "node_modules/popper.js/dist/popper.min.js"
    ]
Run Code Online (Sandbox Code Playgroud)

Saj*_*ran 5

Bootstrap.min.js 依赖于 popper.min.js ,更改顺序如下,

   "scripts": [
     "node_modules/jquery/dist/jquery.slim.min.js",
     "node_modules/popper.js/dist/popper.min.js",
      "node_modules/bootstrap/dist/js/bootstrap.min.js",
   ]
Run Code Online (Sandbox Code Playgroud)