Aurelia CLI build with revisions and karma

I just spent more time than I’d like to admit trying to figure out why my karma tests stopped working. I’m using a cli require js project. I want to have revisions turned on, but when rev is true, karma is still looking for the bundles without the revision string. Is there a way to fix this?

1 Like

revision can be conditional based on env.

Unfortunately, test shares the same env setting as you do local development.
Use "rev": "stage & prod" to skip dev environment.

If you want revision in local development mode, use au run --env stage to run in stage env.


That’s what I ended up doing. I’m not happy with that though. My intent on my build server was to have a single build (prod) with the tests in their own bundle (I never got tests to bundle separately though, but it’s a moot issue now). I modified the au test command to accept a --noBuild command. In Prod I need revisions on. So I ended up doing exactly what you mentioned. I kick off au test, then i kick off my au build --env after tests succeed.

1 Like