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

fix!: Remove lib from .wxt/tsconfig.json #209

Merged
merged 4 commits into from
Nov 4, 2023

Conversation

yyyanghj
Copy link
Contributor

@yyyanghj yyyanghj commented Nov 4, 2023

lib is mismatched cause we manual set lib option so that override the default value which effected by target option.

image

Copy link

netlify bot commented Nov 4, 2023

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 2d7990d
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/6546662d013d02000810638b
😎 Deploy Preview https://deploy-preview-209--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@aklinker1
Copy link
Collaborator

aklinker1 commented Nov 4, 2023

Thanks for the PR!

It makes more sense to remove the lib defaults all together. Can you update your PR?

I added it because WebWorker types aren't present by default. They are sometimes useful for MV3 service workers, but rarely. If we exclude the lib from .wxt/tsconfig.json, like Nuxt does, it will include the ESNext lib by default (because the target is ESNext).

If people want web worker types, they can add them to their own tsconfig. I can add docs around TSConfig customization.

@yyyanghj
Copy link
Contributor Author

yyyanghj commented Nov 4, 2023

Thanks for the PR!

It makes more sense to remove the lib defaults all together. Can you update your PR?

I added it because WebWorker types aren't present by default. They are sometimes useful for MV3 service workers, but rarely. If we exclude the lib from .wxt/tsconfig.json, like Nuxt does, it will include the ESNext lib by default (because the target is ESNext).

If people want web worker types, they can add them to their own tsconfig. I can ad docs around TSConfig customization.

OK. I have updated the PR.

Copy link
Collaborator

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I updated the test snapshots that were failing, and reverted the whitespace change for now, I'll do it separately, it was causing a large diff with the test snapshot for some reason, I'll update it separately.

@aklinker1 aklinker1 changed the title fix: generated tsconfig.json compilerOptions lib is mismatched with t… fix!: Remove lib from .wxt/tsconfig.json Nov 4, 2023
Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Merging #209 (2d7990d) into main (d343555) will increase coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   63.81%   63.82%   +0.01%     
==========================================
  Files          74       74              
  Lines        5784     5783       -1     
  Branches      460      459       -1     
==========================================
  Hits         3691     3691              
+ Misses       2057     2056       -1     
  Partials       36       36              
Files Coverage Δ
src/core/utils/building/generate-wxt-dir.ts 48.91% <ø> (+0.21%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@aklinker1 aklinker1 merged commit 6641ffa into wxt-dev:main Nov 4, 2023
16 checks passed
@aklinker1
Copy link
Collaborator

@yyyanghj Released in v0.9.0

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 this pull request may close these issues.

2 participants