-
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
[1.0] Preloader script prefixes not acting as intended when sourcemaps are disabled #988
Comments
This doesn't seem right — the "fetchKey" is for pulling info off the stats.json. The [0] is for getting the first value off the array. Perhaps there's something goofy about the stats.json file your build is producing? Looking at the core example sites, they don't have this problem. |
@KyleAMathews Yeah currently returning a string - any thoughts why this might be happening? |
Look at the stats.json file in your public folder.
…On Thu, May 18, 2017, 2:30 PM Scotty Eckenthal ***@***.***> wrote:
@KyleAMathews <https://github.com/kyleamathews> Yeah currently returning
a string - any thoughts why this might be happening?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#988 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEVh-IEqdFkqg4y9psAiDnbplYLa-mkks5r7DnkgaJpZM4NfI_1>
.
|
@KyleAMathews Looks like there are a few other funky things going on and they all point back to |
@KyleAMathews We disable sourcemaps in production. When I enable them, this goes away. Perhaps the check should be conditional? |
Ooo that would do it. Yeah just add a check if its an array and that should
do it.
…On Thu, May 18, 2017, 4:12 PM Scotty Eckenthal ***@***.***> wrote:
@KyleAMathews <https://github.com/kyleamathews> We disable sourcemaps in
production. When I enable them, this goes away. Perhaps the check should be
conditional?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#988 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEVh8v7mnyveiAEFstGe0iWhk7GcytKks5r7FHBgaJpZM4NfI_1>
.
|
Haha and just saw your PR doing that :-) will merge and release a bit later. |
@KyleAMathews thanks! |
Merged and published new canary |
* Fixes 0-index issue with link preloader as per #988 * Allowing for disabled sourcemaps * Fix bad logic * Adds redux example * Ignores children in prop type validation * Rolls back to older canary to alleviate 404 issues * Example title metadata * Separate createStore * First pass at wrapping server render body * Moves api implementation into gatsby-ssr.js * Updates metadata
Current version: (latest canary at time of writing)
1.0.0-alpha15-alpha.7211d781
When I run
gatsby build
, the preloader script prefixes do not match up with the scripts in/public
- instead, they're just/x
wherex
is just a single character. Top ofindex.html
reads as follows:All the while, the assets output to public read as follows:
(etc.)
Looks like the preloader-link generating mechanism in
static-entry.js
is just slicing off the first character via thefetchKey
that gets passed to_.get
.This gets resolved when I remove the 0-index at the end of the
fetchKey
which makes sense. Will PR, though I wanted to make sure that this was outlined. In the event that this is a use-case specific to us, I'd like to know why.(Edit - forgot to actually include the example output)
The text was updated successfully, but these errors were encountered: