Skip to content
This repository was 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
pi0 merged 1 commit into
mainfrom
fix/cjs-paths
Sep 9, 2022
Merged

fix(nuxi): don't include an array of paths within an array#7378
pi0 merged 1 commit into
mainfrom
fix/cjs-paths

Conversation

@danielroe

@danielroe danielroe commented Sep 9, 2022

Copy link
Copy Markdown
Member

🔗 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

netlify Bot commented Sep 9, 2022

Copy link
Copy Markdown

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