Problems adding Breeze.js to updated project

I’ve been trying to resurrect a project from a couple of years ago - always fun… It’s currently using the Aurelia Bundler, but when I try to add the breeze-js library, there are a few problems:

Using breeze.debug.js

  1. When I run “au build” I get a couple of trace warnings - …/node_modules/breeze-client/breeze.debug.js has more than one anonymous define. May be a built file from another build system like, Ender. Skipping normalization.
  2. If I then run it, it fails to initialze properly with a “mismatched anonymous defines” error from require.

This is because the default breeze file has a couple of add-ons bundled in with it, and it looks like it’s not really compatible with require.

If I try to use the separate files, it looks like the secondary libraries don’t have their module preamble quite right, and it fails at runtime because those bits haven’t correctly registered themselves with Breeze.

My other thought was to just include them as a traditional - but then is there any way to make them accessible to the main application?

Any recommendations for integrating stubborn legacy packages?

Not having tried what you have: Maybe this new, TypeScriptified, client library works better?

Ooh, the fabled vNext. Thanks, I’ll take a look.

From the readme:
This library is a plugin for the Aurelia framework. It’s goal is to make using Breeze with Aurelia as seamless as possible.

What’s included:

  • An adapter for observing Breeze entities.
  • A Breeze ajax adapter that uses Aurelia’s fetch-client.
  • A light-weight substitute for Breeze’s dependency on Q that uses ES6 promises.
  • Automatic form validation for Breeze entities.