Aurelia Setup project
npm install aurelia-fetch-client --save
npm install aurelia-breeze --save
{
"name": "breeze-client",
"path": "../node_modules/breeze-client",
"main": "breeze.base.debug.js",
"exports": "breeze",
"resources": [
"breeze.modelLibrary.backingStore.js",
"breeze.dataService.webApi.js",
"breeze.dataService.odata.js",
"breeze.ajax.jQuery.js",
"breeze.uriBuilder.json.js",
"breeze.uriBuilder.odata.js"
]
},
{
"name": "aurelia-breeze",
"path": "../node_modules/aurelia-breeze/dist/amd",
"main": "index"
},
{
"name": "aurelia-fetch-client",
"path": "../node_modules/aurelia-fetch-client/dist/amd",
"main": "aurelia-fetch-client"
}
import 'breeze-client/breeze.modelLibrary.backingStore';
import 'breeze-client/breeze.dataService.webApi';
import 'breeze-client/breeze.uriBuilder.json';
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.plugin('aurelia-breeze'); // <--------<<
aurelia.start().then(a => a.setRoot());
}
Bingo!!! You are ready to use breeze in your Aurelia application.
If you will use breeze.debug.js. It contains all adapters and will give you below error due to occurrence of multiple annonymous define.
To reomove error use breeze.base.debug.js
Now breeze.base.debug.js needs backingStore adapter and you will see below error.
Provide breeze-client/modelLibrary.backingStore.js via import in main.ts
Voila, Errors are gone.