Parcel: Clear Console BEFORE HMR

Created on 14 May 2018  路  1Comment  路  Source: parcel-bundler/parcel

馃悰 bug report

Current console.clear() on HMR clears runtime console.log(). A lot of my work still relies on runtime logs and the current console.clear() placement is preventing me from leveraging HMR.

馃帥 Configuration (.babelrc, package.json, cli command)

You can install my demo project: https://github.com/enom-infini/parcel-hmr-console

git clone [email protected]:enom-infini/parcel-hmr-console.git
cd parcel-hmr-console
yarn && yarn dev

馃 Expected Behavior


The console should read three lines:

Console was cleared.
runtime
timeout

馃槸 Current Behavior

The console reads only two lines:

Console was cleared.
timeout

馃拋 Possible Solution

Move placement of console.clear() in src/builtins/hmr-runtime.js

馃敠 Context

Attempting to use Parcel altogether. The console clearing is preventing me from using Parcel ^1.8 due to my current workflow.

馃捇 Code Sample

See my GitHub repo: https://github.com/enom-infini/parcel-hmr-console

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | ^1.8
| Node | 9.7.1
| npm/Yarn | 1.5.1(Yarn)
| Operating System | Linux / Ubuntu (below)

> $ uname -a
Linux vm 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:        17.10
Codename:       artful

Good First Issue Bug

Most helpful comment

any idea of when this will be released?

>All comments

any idea of when this will be released?

Was this page helpful?
0 / 5 - 0 ratings