mercredi 22 avril 2015

Referencing App in ember-cli

I am having an issue when running my ember-cli app in production mode. When I reference App.deferReadiness() it is acting as if App is undefined.

app/app.coffee

`import Ember from 'ember'`
`import Resolver from 'ember/resolver'`
`import loadInitializers from 'ember/load-initializers'`
`import config from './config/environment'`

App = Ember.Application.extend
  modulePrefix: config.modulePrefix
  podModulePrefix: config.podModulePrefix
  Resolver: Resolver
  ready: ->
    Ember.debug "Total setup time: #{(new Date).valueOf() - startTime.valueOf()}ms"

loadInitializers(App, config.modulePrefix)

`export default App`

app/initializers/facebook.coffee

`import App from 'my_app/app'`
initialize = (container, application) ->
  # Results in: t.default.deferReadiness is not a function
  App.deferReadiness()
  # omitted code

This works fine in development mode, but something is up in production. Any ideas?




Aucun commentaire:

Enregistrer un commentaire