question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
witoszekdevcommented, Dec 20, 2019

Okay, so I’ve done more testing and indeed this doesn’t solve the issue 😕

This is rebuild in V2: new-rebuild

And here is from V1: old-rebuild

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 😬.

Note: I have recently reinstalled macOS from scratch…

Here is the codebase that I’ve run those test on: https://github.com/taniotanio7/parcel-performance-test

0reactions
xiaoyu-tamucommented, Apr 4, 2020

Looks like fixed in #4417

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found