Accounts.ui.config not working in production

I have the following code in a /client/views/main.js file:

Meteor.startup(function(){
  Accounts.ui.config({
    passwordSignupFields: "USERNAME_ONLY"
  });
});

It works fine in dev, but not anymore in production, neither with build nor meteor --production.
Also tried without Meteor.startup(), and replace "USERNAME_ONLY" with "USERNAME_AND_OPTIONAL_EMAIL" to no avail.

This would be the same problem as https://groups.google.com/forum/#!topic/meteor-talk/koO1736UTbE it seems.

Also I use ian:accounts-ui-bootstrap-3@1.2.60.

Any help would be greatly appreciated. Having different behaviors in dev and prod is a bummer :frowning:

1 Like

Stuck with the exact same problem. Were you able to figure out the reason?

Make sure you put this code in both server and client context, you have it in a client folder

Mm, maybe this is only for useraccounts …