styled-jsx icon indicating copy to clipboard operation
styled-jsx copied to clipboard

Is there a way to suppress plugin loaded messages?

Open ryexley opened this issue 4 years ago • 1 comments

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

When I run unit tests, I get the message:

[styled-jsx] Loading plugin from path: /Users/bobyexley/projects/aoeu/user-web/node_modules/styled-jsx-plugin-sass/index.js

repeated for each test fixture that tests are run on. So the output is very noisy:

image

I would love to find a way to be able to suppress these messages during test runs.

What is the expected behavior?

Environment (include versions)

  • OS: MacOS 10.15.7
  • Browser: none
  • styled-jsx (version): 3.3.2

ryexley avatar Jan 12 '21 19:01 ryexley

This is not configurable at the moment but we can make it so. https://github.com/vercel/styled-jsx/blob/eac1703467d941f3efc501a777436e63dbc36393/src/_utils.js#L473

Ideally we'd use an env variable like DEBUG, the problem is that right now logging is enabled by default and turning it off would be a breaking change (not a huge deal but still technically a breaking one). Suggestions are welcome!

giuseppeg avatar Jan 12 '21 19:01 giuseppeg