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

vscode - errors in content script #5746

Closed
tomholub opened this issue May 28, 2024 · 2 comments · Fixed by #5779
Closed

vscode - errors in content script #5746

tomholub opened this issue May 28, 2024 · 2 comments · Fixed by #5779
Assignees
Milestone

Comments

@tomholub
Copy link
Collaborator

I can build it without errors, but the IDE is not happy. Are you seeing the same, or is it just me?

image
@tomholub tomholub added this to the discussion milestone May 28, 2024
@sosnovsky
Copy link
Collaborator

Same for me - VS Code showing errors, but builds without any issues. Looks like some updates are needed for types in Bm -

@tomholub
Copy link
Collaborator Author

tomholub commented May 28, 2024

From what I recall, when it builds fine but vscode is unhappy with specifically content script types, it's because vscode is set up with the rest of the browser extension code environment in mind, content scripts being code for a bit of a separate environment which confuses it.

I think the project follows the default ./tsconfig.json but content scripts follow ./conf/tsconfig.content_scripts.json, which then throws errors when working on content scripts with the ./tsconfig.json settings in vscode.

I guess one possibility would be to have a separate code-workspace file that is tailored for the content scripts only. Which is inconvenient. Or perhaps some other project settings, where it could use separate tsconfig for content scripts folder if possible.

But of course, if it can be managed to fix this just by updating types, then we could just do that.

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.

3 participants