だから私はjspmを使ってaureliaをセットアップしています。Bootstrap 4 を次のようにインストールしました。
jspm install npm:bootstrap@4.0.0-alpha.2
次に、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'
ましたが、BS4 で aurelia スケルトンをスピンアップすると、次のようになります。
Uncaught Error: Bootstrap's JavaScript requires jQuery
コンソールに移動して $ を実行すると、jquery が返されます。競合状態だと思いますが、修正方法がわかりませんか?
編集: System.config
System.config({
defaultJSExtensions: true,
transpiler: "none",
paths: {
"*": "dist/*",
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
meta: {
"bootstrap": {
"deps": [
"jquery"
]
}
},
map: {