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

Vendor Styles 404ing #29

Open
HughxDev opened this issue Sep 10, 2015 · 1 comment
Open

Vendor Styles 404ing #29

HughxDev opened this issue Sep 10, 2015 · 1 comment

Comments

@HughxDev
Copy link

Per the Gruntfile, all of the vendor CSS files are concatenated into the main stylesheet:

build_css: {
    src: [
        '<%= vendor_files.css %>',
        '<%= build_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>.css'
    ],
    dest: '<%= build_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>.css'
},

Yet, index.html still includes them all individually:

<!-- compiled CSS --><% styles.forEach( function ( file ) { %>
<link rel="stylesheet" type="text/css" href="<%= file %>" /><% }); %>

This results in <link>s pointing to the vendor CSS files' original locations, but they are not actually outputted there.

I thought merely commenting out the forEach block would solve this, but that gets rid of every CSS file, and I just end up with a blank page. Swapping it out for the last element in the styles array, which points to the compiled vendor/app CSS, fixes it (type="text/css" removed because it is redundant with a properly configured MIME type and discouraged in HTML5):

    <link rel="stylesheet" href="<%= styles.pop() %>" />

It could also be solved by modifying the Gruntfile, but I couldn't use arrays in the ways I expected to there for some reason.

@thardy
Copy link
Owner

thardy commented Oct 9, 2015

I'll try to get to this soon. I guess I don't link in vendor css very much.

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

2 participants