-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Incorporate linkPrefix into webpack's publicPath #502
Conversation
@mojodna does this work? @tribou tried this before and ran into problems... #393 Also for a PR like this, you need to check if prefixing links is active similar to what I've done on the 1.0 branch gatsby/lib/utils/webpack.config.js Line 47 in bc9f926
|
Err, maybe not. Sounds like I fell into the same trap. Here's my app-land workaround: https://github.com/mojodna/posm-admin-ii/blob/master/gatsby-node.js#L16-L22 |
Oh nice! That's perfect. Would love it if you pushed that into the PR. This is a fairly common problem right now so it'd be good to get it fixed. |
Maybe it belongs in the starter packs instead, or in the meantime? Might be worth documenting it (though maybe the issues suffice), since I expect others may also spend hours trying to understand why things aren't working before realizing that it's actually a webpack configuration problem. |
Why not in core? AFAIK the webpack |
Oh, core would be ideal, but if it's not feasible... I'll take another whack at this, but it'll be a few days before I'm able. |
Yeah it should totally be possible. The only problem with your's and @tribou's PR is requiring |
This correctly references asset paths, e.g. FontAwesome, when static sites are targeted at sub-paths.
b6ee431
to
654b87e
Compare
@KyleAMathews I just pushed a replacement commit that uses |
Awesome thanks! Will add this to a release in a jiffy. |
Hiya @mojodna! 👋 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:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
This correctly references asset paths, e.g. FontAwesome, when static sites are targeted at sub-paths.
Prior to this, FontAwesome asset paths would point at the site root.