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

Emit warnings when using svelte/register #4364

Closed
PKlknr opened this issue Feb 4, 2020 · 2 comments · Fixed by #4365
Closed

Emit warnings when using svelte/register #4364

PKlknr opened this issue Feb 4, 2020 · 2 comments · Fixed by #4365

Comments

@PKlknr
Copy link
Contributor

PKlknr commented Feb 4, 2020

Is your feature request related to a problem? Please describe.
No warnings are emitted when using svelte/register. I think this line silently ignores them:

const { js } = compile(fs.readFileSync(filename, 'utf-8'), options);

Describe the solution you'd like
Should svelte/register log warnings when in dev-mode? I guess it could expose them some other way, but I can't see a non-messy one.

Describe alternatives you've considered
I could just re-implement svelte/register.

How important is this feature to you?
I love warnings!

@Conduitry
Copy link
Member

Conduitry commented Feb 4, 2020

Yep, the compile() function used to console.warn the errors itself. During the Svelte v3 changes, we made it return them instead, but we didn't update svelte/register. Logging them in dev mode makes sense to me. I think Svelte v2's svelte/register by default would always display the warnings, dev mode or not. I'm not sure which I prefer.

@Conduitry
Copy link
Member

These warnings are now getting displayed by svelte/register in 3.19.0. Thanks!

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

Successfully merging a pull request may close this issue.

3 participants