Minimizing Bundle Sizes in React
ฝัง
- เผยแพร่เมื่อ 31 ก.ค. 2024
- How to Minimize Bundle Size in React?
In this screencast, we’ll be looking at how to speed up your React app by shrinking JavaScript bundle sizes. By the end of this screencast you’ll be able to configure Webpack to minimize how much data your users need to download.
Watch more screencasts by Big Nerd Ranch on The Frontier
thefrontier.bignerdranch.com/... - วิทยาศาสตร์และเทคโนโลยี
point to point and efficient ty
thank you very much...
Nice video, short but sufficient 👍
you try this @lukas?
What's the changes in package.json?
very good
Nice video. Question that immediately pops to my mind : are all those optimizations built in the create-react-app boilerplate ? (i'll check that eventually)
Where is github repo?
hello sir . how we can make three files webpack dev prod and common and attach to our react app like you are doing
There is a module called webpack-merge: www.npmjs.com/package/webpack-merge
1. Node_env production mode
2. plugin (uglyfyjs)
3. tree
setting webpack.DefinePlugin() option not reducing the bundle size.
same here. were you able to figure out why?
I am subscribe you now, I will try it latter. 😅
Didn't reduce the size of my bundle.
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env', {'modules': false}],
'@babel/preset-react',
],
},
},
You may be able to set Webpack mode to "development", build, then use DevTools to inspect sources--the comments near the top of the code should specify if a module will be kept/removed. Code Radiance has a video on Tree Shaking which shows how to do this
Everyone must read this if webpack.definePlugin not working:
reactjs.org/docs/optimizing-performance.html#webpack