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

Logging logic + reliance on process #3

Open
atepoorthuis opened this issue Aug 2, 2019 · 0 comments
Open

Logging logic + reliance on process #3

atepoorthuis opened this issue Aug 2, 2019 · 0 comments

Comments

@atepoorthuis
Copy link
Collaborator

The reference to process here seems to result in issues in browsers since it isn't available there. I think this can be resolved with a rollup plugin but this wouldn't help in Svelte's repl. Perhaps it's better to test if typeof process === 'undefined' instead?

if (!process) console.warn(message)

Also, we should standardize our logging/warning logic here. I would argue we would want to warn during dev and not in production but this seems only include 'test'?

if (process && process.env.NODE_ENV !== 'test') {

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