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

feat(webpack): suppress not found typescript warnings #5635

Merged
merged 8 commits into from
May 10, 2019

Conversation

Yama-Tomo
Copy link

@Yama-Tomo Yama-Tomo commented May 2, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Hi all ✋

This PR is suppress export ... was not found ... warnings with typescript.

relate: TypeStrong/ts-loader#653

I usually suppress by adding a custom plugin to nuxt.config.ts but, I thought it would be useful to support in the Nuxt.

This is a suggestion. please close if you don't needs this 🙇
Thank you

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
    • TODO: If you need this PR I will update the document.
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@manniL manniL requested a review from kevinmarrec May 2, 2019 06:55
@codecov-io
Copy link

codecov-io commented May 2, 2019

Codecov Report

Merging #5635 into dev will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #5635      +/-   ##
==========================================
+ Coverage   95.57%   95.58%   +0.01%     
==========================================
  Files          81       82       +1     
  Lines        2645     2653       +8     
  Branches      673      677       +4     
==========================================
+ Hits         2528     2536       +8     
  Misses         98       98              
  Partials       19       19
Impacted Files Coverage Δ
packages/config/src/config/build.js 100% <ø> (ø) ⬆️
packages/webpack/src/config/base.js 94.94% <100%> (+0.38%) ⬆️
packages/webpack/src/plugins/warnfix.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d325633...c84c31f. Read the comment docs.

@kevinmarrec
Copy link
Contributor

Hi @Yama-Tomo, thanks for your work !

I'm not really a fan of such plugins suppressing warnings, so ideally I'd prefer an use case where the warnings are not fixable and would showcase the need of this. Could you maybe provide some reproduction where these warnings are persisting in a Nuxt project ?

@Yama-Tomo
Copy link
Author

@kevinmarrec Thanks for your comment!

Here is code for my boilerplate for nuxt project.
https://github.com/Yama-Tomo/vue-vuex-typescript-sample

How to reproduction

  • 1: checkout the nuxt branch after git clone
     
  • 2.a: comment out the L.59 of extend.webpack.config.ts
  • 3.a: execute yarn && yarn dev

or

  • 2.b: comment out the L.32-34 of nuxt.config.ts
  • 3.b: execute yarn && yarn build

@kevinmarrec
Copy link
Contributor

kevinmarrec commented May 7, 2019

@Yama-Tomo Hm alright, seems to be really specific case.

IMO I don't think that such "suppress warning" feature should be included in Nuxt core, I mean for specific cases it could be useful, but I think it could also suppress warnings that people would still want to be shown.

So even if it would be a togglable feature, I'm kind of against that for now but I would like @pi0 opinion about this stuff :)

/cc @pi0

PS: That's really a shame that ts-loader still didn't find a fix in almost 2 years

@atinux atinux self-requested a review May 9, 2019 10:39
Copy link
Contributor

@kevinmarrec kevinmarrec left a comment

Choose a reason for hiding this comment

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

I've discussed further with @atinux on Discord and we decided that's all good :).

Thanks for your great work @Yama-Tomo !

@atinux
Copy link
Member

atinux commented May 9, 2019

Thank you for your work @Yama-Tomo

Could you now open a PR for the docs, the documents to update are:

Please comment that ignoreNotFoundWarnings has been introduced in v2.7.0 :)

@pi0 pi0 mentioned this pull request May 9, 2019
@pi0 pi0 changed the title [suggestion] feat(ts): suppress not found warnings with typescript feat(ts): suppress not found warnings with typescript May 9, 2019
@pi0 pi0 changed the title feat(ts): suppress not found warnings with typescript feat(webpack): suppress not found typescript warnings May 10, 2019
@pi0 pi0 merged commit 1e4708e into nuxt:dev May 10, 2019
@Yama-Tomo
Copy link
Author

@atinux I've created PR of docs 👍 nuxt/docs#1374

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

Successfully merging this pull request may close these issues.

7 participants