Preload scripts
See original GitHub issueCan I some hove get the path to chunk for creating preload scripts on the server side?
const chunks = ['output/chunk/path/chunkname.js', ...]
chunks.map(file => <link rel='preload' href={file}' />)
For example https://github.com/jamiebuilds/react-loadable#getbundles P.S. I`m migrating to your loadable-components from react-loadable 👍
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Link types: preload - HTML: HyperText Markup Language | MDN
The preload value of the <link> element's rel attribute lets you declare fetch requests in the HTML's <head> , specifying resources that ...
Read more >Preload scripts - SpeedCurve
Link rel=preload is useful for downloading any important resource more quickly, such as stylesheets that contain critical CSS, fonts that are ...
Read more >Using Preload Scripts - Electron
A preload script contains code that runs before your web page is loaded into the browser window. It has access to both DOM...
Read more >javascript - Preload script file - Stack Overflow
Are you sure you want to "preload" or just wait until your page is done rendering and then load your big JS script?...
Read more >Preload: What Is It Good For? - Smashing Magazine
It gives developers the ability to define custom loading logic without suffering the performance penalty that script-based resource loaders ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dgieselaar thanks for this! It looks great!
@neoziro I’ve got it working with a fork, this is enough: https://github.com/dgieselaar/loadable-components/blob/65ee245f1166a8ed0ab46760821748ce93cba79e/src/loadable.js#L116. Does it make sense?