Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production build doesn't include tags from head.hbs #16

Open
egemon opened this issue Nov 18, 2016 · 0 comments
Open

Production build doesn't include tags from head.hbs #16

egemon opened this issue Nov 18, 2016 · 0 comments

Comments

@egemon
Copy link

egemon commented Nov 18, 2016

enviroment.js

/* jshint node: true */
module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'blabla',
    environment: environment,
    rootURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
      },
      EXTEND_PROTOTYPES: {
        Date: false
      }
    },
    APP: {
    }
  };

  if (environment === 'test') {
    ENV.locationType = 'none';
    ENV.APP.LOG_ACTIVE_GENERATION = false;
    ENV.APP.LOG_VIEW_LOOKUPS = false;
    ENV.APP.rootElement = '#ember-test';
  }

  return ENV;
};

application.js

import Ember from 'ember';

export default Ember.Route.extend({
  headData: Ember.inject.service(),
  afterModel() {
    this.set('headData.rootURL', this.router.rootURL);
  }
});

head.hbs

<link rel="stylesheet" href="{{model.rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{model.rootURL}}assets/my-project.css">
<link rel="stylesheet" href="https://some/static/path/style.css" media="screen" title="no title">

Everything works fine during ember server, and nothing is injected when running ember build -prod. Is it the expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant