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(builder): use require.resolve to get the path of babel-loader #4150

Merged
merged 1 commit into from Oct 22, 2018

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 18, 2018

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

Yarn sometimes tries to move packages into a subpackage. (yarn moved babel-loader dependency into node_modules/@nuxt/builder-edge/node_modules/babel-loader when upgraded a project) This break builds when resolving webpack loaders because they are being required from root package nuxt builder.

This PR is the same as a workaround for '@nuxtjs/babel-preset-app'/NPX. Only targetting babel loaders as they are more likely to move into the builder.

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.

@pi0 pi0 requested a review from clarkdo October 18, 2018 22:07
@codecov-io
Copy link

codecov-io commented Oct 18, 2018

Codecov Report

Merging #4150 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##             dev   #4150   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files         29      29           
  Lines       1561    1561           
  Branches     409     409           
=====================================
  Hits        1277    1277           
  Misses       224     224           
  Partials      60      60
Impacted Files Coverage Δ
packages/builder/src/webpack/base.js 98.41% <ø> (ø) ⬆️
packages/builder/src/webpack/utils/perf-loader.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 fff7812...8604cf3. Read the comment docs.

@galvez galvez requested a review from Atinux October 21, 2018 22:06
@pi0 pi0 merged commit 60dbc6d into dev Oct 22, 2018
@pi0 pi0 deleted the fix/babel-loader-require branch October 22, 2018 21:48
@cesasol
Copy link

cesasol commented Nov 17, 2018

This breaks pnpm 😢

@lock
Copy link

lock bot commented Dec 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 17, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants