在数据库中引导前导入jquery

在数据库中引导前导入jquery,jquery,twitter-bootstrap,Jquery,Twitter Bootstrap,无论我做什么,我似乎都无法在bootstrap想要使用jquery之前导入它 这是我的app.js // JQuery libary needed for bootstrap import 'jquery/dist/jquery.min.js'; // Bootstrap libary import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/js/bootstrap.js'; // Bootstrap-select

无论我做什么,我似乎都无法在bootstrap想要使用jquery之前导入它

这是我的app.js

// JQuery libary needed for bootstrap
import 'jquery/dist/jquery.min.js';

// Bootstrap libary
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap/dist/js/bootstrap.js';

// Bootstrap-select libary 
import 'bootstrap-select/dist/css/bootstrap-select.css';
import 'bootstrap-select/dist/js/bootstrap-select.js';

// Angular-material standard CSS 
import 'angular-material/angular-material.css';
这是我的package.json

  "dependencies": {
    "@angular/material": "^2.0.0-beta.7",
    "angular": "^1.6.4",
    "angular-material": "^1.1.4",
    "angular-translate": "^2.15.1",
    "angular-translate-storage-cookie": "^2.15.1",
    "angular-translate-storage-local": "^2.15.1",
    "angular-ui-router": "^1.0.3",
    "jquery": "^3.2.1",
    "bootstrap": "^3.3.7",
    "bootstrap-select": "^1.12.3",
    "json-loader": "^0.5.4",
    "material-design-icons": "^3.0.1"
  },
但当我运行我的页面时,它会说:

bootstrap.js?f974:8 Uncaught Error: Bootstrap's JavaScript requires jQuery
    at eval (eval at <anonymous> (app.bundle.js:1094), <anonymous>:8:9)
    at Object.<anonymous> (app.bundle.js:1094)
    at __webpack_require__ (app.bundle.js:20)
bootstrap.js?f974:8未捕获错误:bootstrap的JavaScript需要jQuery
评估时(评估时(app.bundle.js:1094),:8:9)
反对。(app.bundle.js:1094)
at\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuwpack\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

import*作为$from'jquery';或者import*作为jquery/dist/jquery.min.js/中的$,只是查看了一些初学者项目,他们大多是这样定义的。这不是答案,只是我发现的一个暗示。@Doomenik我肯定会尝试一下,同样的结果:-(我唯一能做到这一点的方法是,如果我直接将其包含在HTML页面中——其他所有导入都很好,这是唯一的jquery问题,我完全忘了问,您是否使用angular cli?如果是,请将其添加到ScriptSevently下的angular-cli.json中,这一个同样有帮助。)