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

fix(kit): add manually installed module to transpile#9187

Closed
xtoolkit wants to merge 1 commit intonuxt:mainfrom
xtoolkit:patch-3
Closed

fix(kit): add manually installed module to transpile#9187
xtoolkit wants to merge 1 commit intonuxt:mainfrom
xtoolkit:patch-3

Conversation

@xtoolkit
Copy link
Copy Markdown
Contributor

🔗 Linked issue

nuxt/content#1665

❓ 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

Following the previous merge request (#8963), i think we can support NuxtModule type.

📝 Checklist

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

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Nov 19, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

} else if (moduleToInstall.getMeta) {
const meta = await moduleToInstall.getMeta()
if (meta.name) {
nuxt.options.build.transpile.push(meta.name)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is dangerous and error prune. Name of module can be integration/library name not npm package of nuxt modue itself.

@pi0
Copy link
Copy Markdown
Member

pi0 commented Nov 21, 2022

Thanks for the pull request dear @xtoolkit please keep doing this <3 Because of the mentioned reason above, i belive modules (ie: content) themselves should ensure their runtime dir is in the transpile array as needed as a safe method. Mapping name<>transform can result in unexpected behavior.

@pi0 pi0 closed this Nov 21, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants