[V2] How to speed up parcel in development?
See original GitHub issue❔ Question
import { CssBaseline, Button } from "@material-ui/core";
import React from "react";
import ReactDOM from "react-dom";
ReactDOM.render(
<div>
<CssBaseline />
<Button>Hi2</Button>
</div>,
document.getElementById("root")
);
The above code took 3~5 seconds on rebuild when I add new character inside Button component. I noticed the bundler optimizing index.html on every rebuild. Is it the expected behavior? How to speed thing up?
I use parcel serve index.html
command to bundle my react application.
🔦 Context
"parcel": "^2.0.0-alpha.3.2"
"react": "16.12.0",
"react-dom": "16.12.0",
"@material-ui/core": "4.7.0",
💻 Code Sample
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.0.0-alpha 3.2 |
Node | 10.17.0 |
npm/Yarn | Yarn 1.19.1 |
Operating System | MacOS Catalina 10.15.2 Beta (19C32e) |
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Development - Parcel
Parcel automatically tracks all of the files, configuration, plugins, and dev dependencies that are involved in your build, and granularly invalidates the cache ......
Read more >What you need to know about Parcel 2 - LogRocket Blog
Let's look at the latest version of the JavaScript bundling tool Parcel and its new features that can help developers build faster websites....
Read more >Parcel.js v2 Bundler, is an excellent web development build tool.
Version 2 of the Parcel build tool is simple and efficient. · Parcel v2 replaced a Webpack 5 project in 10 minutes. ·...
Read more >5 Hacks That Will Help You Deliver Packages Fast
When you're wondering how to increase package delivery speed, then finding the right package at the right stop is an excellent hack to...
Read more >Speed Up Your Development Flow With These Dockerfile Best ...
To avoid this and only fetch the dependencies when they change (i.e.: when package.json or package-lock.json changes), we should consider ...
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
Okay, so I’ve done more testing and indeed this doesn’t solve the issue 😕
This is rebuild in V2:
And here is from V1:
And for good measure, this is the same app build using Create-React-App (sorry for the video form, but CRA doesn’t show the rebuild time as Parcel does). It builds basically in milliseconds 😬.
Here is the codebase that I’ve run those test on: https://github.com/taniotanio7/parcel-performance-test
Looks like fixed in #4417