ember-cli-head
ember-cli-head copied to clipboard
Production build doesn't include tags from head.hbs
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?