preactjs / wmr

👩‍🚀 The tiny all-in-one development tool for modern web apps.
https://wmr.dev/
MIT License
4.92k stars 109 forks source link

Improve CLI output for compilation warnings #851

Closed marvinhagemeister closed 3 years ago

marvinhagemeister commented 3 years ago

Instead of just showing the warning message we'll now show where the warning came from and potentially display a code frame of the code if available.

Before:

Screenshot 2021-09-05 at 18 36 47

After:

Screenshot 2021-09-05 at 18 31 59
changeset-bot[bot] commented 3 years ago

🦋 Changeset detected

Latest commit: 504af2072e1e04f8ad946f64a191a813ae28ea3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---- | ----- | | wmr | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 3 years ago

Size Change: +260 B (0%)

Total Size: 804 kB

Filename Size Change
packages/wmr/wmr.cjs 767 kB +260 B (0%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `examples/demo/dist/about/index.html` | 713 B | | `examples/demo/dist/alias-outside/index.html` | 693 B | | `examples/demo/dist/assets/Calendar.********.css` | 702 B | | `examples/demo/dist/assets/style.********.css` | 624 B | | `examples/demo/dist/chunks/alias-outside.********.js` | 138 B | | `examples/demo/dist/chunks/class-fields.********.js` | 211 B | | `examples/demo/dist/chunks/compat.********.js` | 15.3 kB | | `examples/demo/dist/chunks/hoofd.module.********.js` | 1.48 kB | | `examples/demo/dist/chunks/index.********.js` | 267 B | | `examples/demo/dist/chunks/json.********.js` | 239 B | | `examples/demo/dist/chunks/meta-tags.********.js` | 300 B | | `examples/demo/dist/chunks/prerender.********.js` | 294 B | | `examples/demo/dist/class-fields/index.html` | 704 B | | `examples/demo/dist/compat/index.html` | 1.55 kB | | `examples/demo/dist/env/index.html` | 779 B | | `examples/demo/dist/error/index.html` | 708 B | | `examples/demo/dist/files/index.html` | 739 B | | `examples/demo/dist/index.********.js` | 7.74 kB | | `examples/demo/dist/index.html` | 770 B | | `examples/demo/dist/json/index.html` | 712 B | | `examples/demo/dist/lazy-and-late/index.html` | 714 B | | `examples/demo/dist/meta-tags/index.html` | 782 B |

compressed-size-action