Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is possible to mute the duplicate load log in the terminal? #2

Closed
callmeberzerker opened this issue Aug 3, 2021 · 5 comments
Closed

Comments

@callmeberzerker
Copy link

Description

Currently whenever a file is changed in the terminal the following lines are displayed:

2:32:37 PM [vite] hmr update /src/shared/form/control/DateTimePickerField.tsx
load /Users/my-user/projects/the-project/src/shared/form/control/DateTimePickerField.tsx

The first one is from vitejs itself and the second it is from the plugin I believe.

@joshnuss
Copy link
Owner

joshnuss commented Aug 3, 2021

Hi @callmeberzerker,

I'm not seeing that on my end, are you on the latest version? I updated a few times over the past few hours.

This is what it outputs on an example project:

svelte-test > npm run dev

> svelte-test@0.0.0 dev
> vite

Port 3000 is in use, trying another one...

  vite v2.4.4 dev server running at:

  > Local: http://localhost:3001/
  > Network: use `--host` to expose

  ready in 283ms.

8:45:57 a.m. [vite] hmr update /src/App.svelte
8:46:11 a.m. [vite] hmr update /src/App.svelte (x2)

@callmeberzerker
Copy link
Author

callmeberzerker commented Aug 3, 2021

Hi @joshnuss,

I am using vite@2.4.4 and the latest version of the plugin 0.1.4. Not sure what's the cause here... 🕵️

In my case on dev it lists all the files with the load prefix, and then when I change a file -> it prints both the [vite HMR] and load message for that file as described in the first message.

If I remove the plugin there is no load prefix nor duplicated statements.

@callmeberzerker
Copy link
Author

callmeberzerker commented Aug 3, 2021

Just tested it on my Windows machine (previously I was on a Mac) with a separate new project. It's still happening... I will publish repro repo soon. It's weird because I don't see any load ... statement sin the plugin source code. 😕

Here is a sample vite react-ts template project with only this plugin: https://github.com/callmeberzerker/example-notifier

When you start the project you will see something similar to:

load E:/Projects/example-notifier/node_modules/.pnpm/vite@2.4.4/node_modules/vite/dist/client/client.mjs
/vite-plugin-notifier
/vite-plugin-notifier
/vite-plugin-notifier
load /vite-plugin-notifier
/vite-plugin-notifier
load E:/Projects/example-notifier/src/main.tsx
load E:/Projects/example-notifier/node_modules/.pnpm/vite@2.4.4/node_modules/vite/dist/client/env.mjs
load E:/Projects/example-notifier/src/index.css
load E:/Projects/example-notifier/src/App.tsx
load E:/Projects/example-notifier/src/App.css
/vite-plugin-notifier

@joshnuss
Copy link
Owner

joshnuss commented Aug 3, 2021

Thanks for repro, I found the problem.

I had some uncommitted console.log's when i did npm publish, forgot that it uses the current working dir (doh).

I've cut a new version 0.1.5 and it's now fixed in 1a97dcc

Thanks for reporting!

@joshnuss joshnuss closed this as completed Aug 3, 2021
@callmeberzerker
Copy link
Author

Awesome thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants