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

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

xtoolkit
Copy link
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

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
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
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.

None yet

3 participants