Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

CSS is not being included in production builds #74

Open
cafreeman opened this issue Apr 8, 2017 · 1 comment
Open

CSS is not being included in production builds #74

cafreeman opened this issue Apr 8, 2017 · 1 comment

Comments

@cafreeman
Copy link

I'm encountering an issue where CSS that has been included from node_modules via Broccoli-Concat is not making its way into the production build.

You can see this approach being used in the TodoMVC demo here.

This methods works just fine in dev mode, but in production the app.css file won't actually exist, since it will instead be app-<build-hash>.css, and the index.html will reflect this. However, broccoli-concat is still churning out the regular app.css file, so it gets ignored :(

You can see an example of that here (note the two different CSS files):

image

And in index.html we're including the following stylesheet: <link rel="stylesheet" href="app-d41d8cd98f00b204e9800998ecf8427e.css">

As a result, ember s -prod looks like this:

image

@rwjblue
Copy link
Member

rwjblue commented Apr 9, 2017

I mentioned this in slack, but a work around for now (and what we should update the todomvc demo to do) is:

class CustomApp extends GlimmerApp {
 cssTree() {
   let cssTree = super();
   return customBroccoliStuff(cssTree);
 }
}
let app = new CustomApp(defaults);
return app.toTree();

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

No branches or pull requests

2 participants