@lvxiaohui/cocos-tree-shake-test
v1.0.0
Published
Flux Framework for Cocos Creator - Real npm package test
Maintainers
Readme
@flux-test-real/cocos
This is a test package for verifying Sub-path Exports Tree Shaking in Cocos Creator.
Test Purpose
Verify if Cocos Creator supports npm package-level Tree Shaking with Sub-path Exports.
Package Structure
@flux-test-real/cocos/
├── common/ # Shared utilities (1.6KB)
├── ui/ # UI Manager (2.3KB)
├── audio/ # Audio Manager (2.7KB)
└── ecs/ # ECS System (2.8KB)Usage
// Only import UI module
import { UIManager } from '@flux-test-real/cocos/ui';
// Expected: Only UI and Common should be bundled
// Audio and ECS should be excludedTest Scenario
- Install this package
- Import only
@flux-test-real/cocos/ui - Build the Cocos Creator project
- Check if Audio and ECS modules are excluded from the build output
Test Date
2025-10-31
