Package weighs 65kb in build - Reducing bundle size of the package in a Create-React-App Typescript project.
See original GitHub issueWe use the component in an important page, where SEO and load speed are important. We would like to reduce bundle size. I am aware of #311. But when I cahnge imports to
import Player from 'react-player/lib/Player'
import YouTube from 'react-player/lib/players/YouTube'
types are not supported at all. I guess there are two solutions:
- Updating the types file, and typing objects in the “lib” path.
- Alternatively, getting an API for the Player object. Any suggestions?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Reducing bundle size of the package in a Create-React-App ...
Package weighs 65kb in build - Reducing bundle size of the package in a Create-React-App Typescript project. #633.
Read more >5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
In this article, I will discuss 5 techniques to reduce the JavaScript bundle size to avoid any performance bottlenecks.
Read more >Two Quick Ways To Reduce React App's Size In Production
File size Development v/s Production. 2. Serve gzipped file in production. You can dramatically reduce the size by gzipping the bundle.js.
Read more >Analyze your React app's bundle size and reduce it using ...
Reduce your bundle size by code-splitting Instead of keeping all your code in the one bundle, you can split it up into multiple...
Read more >Slimming down your bundle size - LogRocket Blog
A critical part for improving frontend performance is to reduce the JavaScript bundle size that should be downloaded via the network.
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 Free
Top 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
@prochorz Your question isn’t related to the issue at all. It doesn’t belong here.
I suggest you ask it in some forum, perhaps Stack Over Flow.
This should be partly addressed by the 2.0.0 alpha, which uses lazy player loading: