@bartocc wrote:
I’d like to understand why
model.constructor.name
is not available in prod builds while it works in dev and test envs for models defined with the ES6 class syntax.I’ve setup a test app here: https://github.com/bartocc/model.constructor.name-prod-bug
To reproduce
git clone https://github.com/bartocc/model.constructor.name-prod-bug.git
cd model.constructor.name-prod-bug
ember serve
open http://localhost:4200
You should see:
model.constructor.name: ArticleModel model.constructor.modelName: article
Now stop the server and start it again in prod env
ember serve --environment production
open http://localhost:4200
You should see something like this:
model.constructor.name: o model.constructor.modelName: article
Why do we have such a different behaviour?
Posts: 4
Participants: 2