Skip to content

Switch to npm link for using local libs#37

Merged
willeastcott merged 2 commits intomainfrom
npm-link
Jan 6, 2026
Merged

Switch to npm link for using local libs#37
willeastcott merged 2 commits intomainfrom
npm-link

Conversation

@willeastcott
Copy link
Contributor

This pull request updates how the pcui library is imported and simplifies the build configuration by removing module aliasing and related dependencies. The most significant changes are the switch to using the scoped @playcanvas/pcui package throughout the codebase and the removal of Rollup alias configuration and associated scripts.

Dependency and build configuration changes:

  • Removed @rollup/plugin-alias and cross-env dependencies from package.json, along with the develop:local script, simplifying the build setup. [1] [2]
  • Eliminated all Rollup alias logic from rollup.config.mjs, including the plugin import, alias entry definitions, and usage in the plugins array. [1] [2]

Codebase-wide import updates:

  • Updated all imports from pcui to use the scoped package @playcanvas/pcui in every source file, ensuring consistency with the package name and future compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

@willeastcott willeastcott self-assigned this Jan 6, 2026
@willeastcott willeastcott added the enhancement New feature or request label Jan 6, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR transitions from using module aliasing to using npm link for local library development, updating all imports to use the scoped @playcanvas/pcui package name and removing the build-time aliasing infrastructure.

Key changes:

  • Removed Rollup alias plugin and related environment-based module resolution logic
  • Updated all source file imports from pcui to @playcanvas/pcui
  • Cleaned up TypeScript path mappings that are no longer needed

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated no comments.

File Description
package.json Removed @rollup/plugin-alias and cross-env dependencies, and the develop:local script
rollup.config.mjs Removed alias plugin configuration and environment-based path resolution logic
tsconfig.json Removed paths mapping for pcui and playcanvas modules
src/*.ts (12 files) Updated imports from pcui to @playcanvas/pcui across all source files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@willeastcott willeastcott merged commit 23d72c9 into main Jan 6, 2026
2 checks passed
@willeastcott willeastcott deleted the npm-link branch January 6, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants