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

Don't ask me to add $lib to compilerOptions.paths #4218

Closed
UltraCakeBakery opened this issue Mar 4, 2022 · 2 comments · Fixed by #4735
Closed

Don't ask me to add $lib to compilerOptions.paths #4218

UltraCakeBakery opened this issue Mar 4, 2022 · 2 comments · Fixed by #4735
Milestone

Comments

@UltraCakeBakery
Copy link

Describe the problem

Since the most recent version of svelte kit, svelte kit throws a warning telling us that we should add lib to our jsconfig.json:

Your compilerOptions.paths in jsconfig.json should include the following:
{
  "$lib":["src/lib"],
  "$lib/*":["src/lib/*"]
}

We do not use the lib folder, nor did we define it in the svelte.config.js. We are also not planning on using it any time soon.
Without making a fork of svelte kit and removing the warning directly in the source code, there is no way for us to work around it without polluting our jsconfig, or adding a never to be used alias in vite.

Describe the proposed solution

Only show the errors if( !Object.keys( compilerOptions.paths || {} ).length ), or something similar.

Alternatives considered

Applying some tape on the perfect position on our screens and never touching the resize terminal edge ever again.

Importance

nice to have

Additional Information

No response

@rmunn
Copy link
Contributor

rmunn commented Mar 5, 2022

Alternately, only show that error if src/lib exists. Then anyone who doesn't want to use it can just remove the src/lib directory and not see the error. That seems the simplest way to handle the situation.

@aradalvand
Copy link
Contributor

I have this issue as well.
I'm not using the lib folder, I have other aliases defined in svelte.config.js, so this warning is annoying and useless.

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

Successfully merging a pull request may close this issue.

4 participants