uniapp-subpackage-node-modules

Diagnose node_modules dependencies not packaged into uni-app sub-package vendor.js files.

5|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/uni-toolkit/skills --skill uniapp-subpackage-node-modules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uniapp-subpackage-node-modules
Source: https://github.com/uni-toolkit/skills/tree/main/skills/uniapp-subpackage-node-modules
Command: npx skills add https://github.com/uni-toolkit/skills --skill uniapp-subpackage-node-modules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps diagnose why node_modules dependencies in uni-app sub-packages are not being correctly packaged into their respective sub-package vendor.js files, instead being included in the main package vendor.js.

Core Features & Use Cases

  • Dependency Analysis: Analyze and diagnose why certain node_modules dependencies are not packaged into the correct sub-package vendor.js file.
  • Version and Configuration Check: Verify that the uni-app version and configuration settings are correct for proper sub-package optimization.
  • Dependency and Reference Chain Verification: Ensure that dependencies are correctly declared and not being unnecessarily referenced by the main package or other sub-packages.

Quick Start

Use the $uniapp-subpackage-node-modules skill to check why the node_modules dependencies in this uni-app project are still in the main package vendor.js, not in the sub-package vendor.js.

Frequently Asked Questions about uniapp-subpackage-node-modules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why are my uni-app node_modules dependencies still in the main package vendor.js?

Dependencies remain in the main package vendor.js when they are not correctly declared or are unnecessarily referenced by the main package. Diagnosing this requires analyzing the uni-app sub-package configuration and the dependency reference chain.

How do I package node_modules into a uni-app sub-package vendor.js correctly?

To package node_modules into a sub-package vendor.js, verify your uni-app version supports sub-package optimization and ensure dependencies are exclusively referenced within that sub-package. Analyze dependency declarations to prevent main package hoisting.

What causes a uni-app sub-package optimization to fail for node_modules?

Sub-package optimization fails when uni-app configuration settings are incorrect or when dependencies are improperly referenced across packages. Diagnosing involves checking version compatibility and verifying the dependency reference chain.

Can I use uni-app sub-package optimization for any node_modules dependency?

You can use uni-app sub-package optimization for node_modules dependencies by ensuring correct declaration in the sub-package. Requires verifying that the main package or other sub-packages do not unnecessarily reference these dependencies.

How does referencing a node_modules dependency from the main package affect sub-packaging?

Referencing a node_modules dependency from the main package forces it into the main package vendor.js. Diagnosing this issue requires verifying the dependency reference chain to ensure dependencies are only referenced by their target sub-package.

What are the limitations when diagnosing uni-app sub-package vendor.js packaging issues?

Limitations include relying on accurate uni-app version and configuration settings for proper sub-package optimization. Diagnosing cannot fix packaging issues if dependencies are fundamentally required by the main package and cannot be isolated.