Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxi): don't include an array of paths within an array #7378

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Sep 9, 2022

πŸ”— Linked issue

nuxt/bridge#515. nuxt/bridge#514. ctx: #6943

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

global.__NUXT_PREPATHS__ is an array (if defined) and the resolveModule was choking on this (sometimes):

export function resolveModule (id: string, paths?: string | string[]) {
return normalize(_require.resolve(id, { paths: getModulePaths(paths) }))
}

Array.concat() handles this for us.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working cli labels Sep 9, 2022
@danielroe danielroe requested a review from pi0 September 9, 2022 10:07
@danielroe danielroe self-assigned this Sep 9, 2022
@netlify
Copy link

netlify bot commented Sep 9, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 8b24992
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/631b105652c7350008e1ae46

@pi0 pi0 merged commit e05f8ee into main Sep 9, 2022
@pi0 pi0 deleted the fix/cjs-paths branch September 9, 2022 10:17
This was referenced Sep 14, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants