-
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
prevent duplicate json entries in sync-requires.js #4679
Conversation
This mitigates the dreaded "deoptimised" message from babel by preventing the `sync-requires.js` file creating duplicates in the `exports.json` hash. ``` [BABEL] Note: The code generator has deoptimised the styling of "/Users/docwhat/Play/WebSites/docwhat/.cache/sync-requires.js" as it exceeds the max of "500KB". ```
Deploy preview for gatsbygram ready! Built with commit f2c7402 |
Deploy preview for using-drupal ready! Built with commit f2c7402 |
I'm not sure why this would be necessary — each page has a unique json name already and you fixed duplicate layout jsons being added — what JSON is being duplicated? |
In the See my gist |
Check if the same duplicates show up as pages? E.g. look in |
We're looping over a data object and pushing onto an array — slow i/o isn't going to change anything about that. |
I ran |
If you have duplicate json entries, it means you have duplicate pages — pages have to have unique json file paths — and we're just looping over them and pushing the JSON name on the array there. https://github.com/docwhat/gatsby/blob/f2c7402353979034563ab3148be876a79e2168d5/packages/gatsby/src/internal-plugins/query-runner/pages-writer.js#L39 So the only way that there's duplicate json entries is if there's duplicate pages. Unless there's something weird going on there I'm missing. |
Closing in favor of #4681 |
This mitigates the dreaded "deoptimised" message from babel by
preventing the
sync-requires.js
file creating duplicates in theexports.json
hash.This does not fix the problems with the queue of
*.js.<seconds-since-epoch>
being created.