Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

@danielroedanielroe 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):

exportfunctionresolveModule(id: string,paths?: string|string[]){
returnnormalize(_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.

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

netlifyBot commented Sep 9, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit8b24992
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/631b105652c7350008e1ae46

pi0
pi0 approved these changes Sep 9, 2022
@pi0
pi0 merged commit e05f8ee into mainSep 9, 2022
@pi0
pi0 deleted the fix/cjs-paths branch September 9, 2022 10:17
This was referenced Sep 14, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't workingcli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@danielroe@pi0