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

refactor: prepare for external typescript support #5854

Merged
merged 8 commits into from Jun 4, 2019
Merged

refactor: prepare for external typescript support #5854

merged 8 commits into from Jun 4, 2019

Conversation

kevinmarrec
Copy link
Contributor

@kevinmarrec kevinmarrec commented Jun 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

Refactor some internals so it can fits to the outsourcing/externalization of the typescript support.

  1. Ability to make modules extend Builder supportedExtensions + refactor of createRoutes function signature to fit better and pass these supported extensions.

  2. Ability to make modules customize Webpack WarningFix plugin filters.

  3. Ability to make modules grab the Nuxt babelLoader (with our predefined babel options) to use it when extending webpack config. Useful to use it with in typescript module with ts-loader to handle tsx files.

Related : #5858

Checklist:

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

@codecov-io
Copy link

codecov-io commented Jun 3, 2019

Codecov Report

Merging #5854 into dev will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #5854      +/-   ##
==========================================
- Coverage   95.72%   95.68%   -0.04%     
==========================================
  Files          82       82              
  Lines        2690     2689       -1     
  Branches      690      690              
==========================================
- Hits         2575     2573       -2     
- Misses         97       98       +1     
  Partials       18       18
Flag Coverage Δ
#e2e 100% <ø> (ø) ⬆️
#fixtures 50.35% <100%> (-0.02%) ⬇️
#unit 92.67% <100%> (-0.04%) ⬇️
Impacted Files Coverage Δ
packages/config/src/config/build.js 100% <ø> (ø) ⬆️
packages/webpack/src/plugins/warning-ignore.js 100% <ø> (ø)
packages/utils/src/route.js 100% <100%> (ø) ⬆️
packages/webpack/src/config/base.js 94.94% <100%> (ø) ⬆️
packages/builder/src/builder.js 99.6% <100%> (ø) ⬆️
packages/vue-renderer/src/renderer.js 93.49% <0%> (-0.82%) ⬇️

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 f2c0889...8ce34b1. Read the comment docs.

@kevinmarrec kevinmarrec requested review from a team and pi0 June 3, 2019 00:43
packages/builder/src/builder.js Outdated Show resolved Hide resolved
packages/webpack/src/config/base.js Outdated Show resolved Hide resolved
packages/webpack/src/config/base.js Outdated Show resolved Hide resolved
packages/webpack/src/config/base.js Outdated Show resolved Hide resolved
packages/builder/src/builder.js Show resolved Hide resolved
packages/config/src/config/build.js Outdated Show resolved Hide resolved
@kevinmarrec
Copy link
Contributor Author

kevinmarrec commented Jun 3, 2019

@pi0 Should we rename https://github.com/nuxt/nuxt.js/blob/dev/packages/webpack/src/plugins/warnfix.js#L12 too ?
warnignore.js / warning-ignore.js ?

@pi0
Copy link
Member

pi0 commented Jun 3, 2019

@kevinmarrec yes, please. seems a more reasonable name now

@kevinmarrec
Copy link
Contributor Author

PR should be fine now, i'm not sure if it's relevant adding documentation for build.warningIgnoreFilters & build.additionalExtensions as it's things that users won't customize at all.

@kevinmarrec kevinmarrec requested a review from pi0 June 4, 2019 12:11
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Atinux Atinux left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

None yet

5 participants