gatsby-plugin-amp
gatsby-plugin-amp copied to clipboard
Preloaded JS is downloaded, but never used
Problem
Gatsby add <link rel="preload" ... /> scripts to each page. The browser will download these, but never execute them. Chrome warns about this issue with the console message:
The resource https://path/to/script.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
asvalue and it is preloaded intentionally.
Solution
Add code to remove these (inside here?) when calling replaceHeadComponents().
PR here: https://github.com/jafaircl/gatsby-plugin-amp/pull/32