Итак, у меня есть настройка aurelia с использованием jspm. У меня есть установки Bootstrap-так:JSPM/Aurelia/Bootstrap 4 не может найти jQuery
jspm install npm:[email protected]
Тогда в main.js я сделал:
import 'jquery';
import 'bootstrap';
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging();
//Uncomment the line below to enable animation.
//aurelia.use.plugin('aurelia-animator-css');
//if the css animator is enabled, add swap-order="after" to all router-view elements
//Anyone wanting to use HTMLImports to load views, will need to install the following plugin.
//aurelia.use.plugin('aurelia-html-import-template-loader')
aurelia.start().then(() => aurelia.setRoot());
}
Я даже попытался import $ from 'jquery'
но когда я раскручиваю Aurelia скелет с BS4 я получаю:
Uncaught Error: Bootstrap's JavaScript requires jQuery
Я могу пойти на консоль и сделать $, и он возвращает материал jquery. Я думаю, что это состояние гонки, но не уверен, как исправить?
EDIT: System.config
System.config({
defaultJSExtensions: true,
transpiler: "none",
paths: {
"*": "dist/*",
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
meta: {
"bootstrap": {
"deps": [
"jquery"
]
}
},
map: {
показать строки вашего config.js, которые содержат что-то связанное с "bootstrap" –