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

absolute css asset loading (fixes #310) #311

Merged
merged 1 commit into from
Jun 14, 2016

Conversation

IstoraMandiri
Copy link
Contributor

fixes #310 using webpack-contrib/css-loader#113

NPM tests passed, and it works in my project.

@KyleAMathews
Copy link
Contributor

After some research, agree this looks like the right fix. One quick improvement though before I can merge — please wrap the / with the prefixLink helper so that this will work when people are building for Github Pages or other places where their absolute links aren't relative to the domain root.

Thanks!

@KyleAMathews KyleAMathews merged commit d9e4cf5 into gatsbyjs:master Jun 14, 2016
@KyleAMathews
Copy link
Contributor

Hrmm... playing with this a bit and staring at test failures I realized we can't use the prefixLink helper here as it tries to import the config.toml file which can only be done by Webpack not Node... sigh :-(

So I guess this will be a WTF for any poor sap who needs the publicPath set correctly on his CSS and is building a site with prefixed links. The main solution I see is moving config to a plain js module (which has other advantages as well namely being able to use logic for setting config + responding to env variables).

@KyleAMathews
Copy link
Contributor

Published v0.11.4 with this PR, thanks!

@jlengstorf
Copy link
Contributor

Hiya @hitchcott! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

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

Successfully merging this pull request may close these issues.

CSS-included Assets not loading on all routes
3 participants