Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds support for workspace protocol #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

EdRW
Copy link

@EdRW EdRW commented Jan 17, 2025

Currently, dependencies that live in another package within a monorepo workspace get treated as external, which causes a error.

This change adds support for monorepos using the workspace: protocol by treating workspace packages as notExternal.

This is done by checking the package.json for dependencies that are referenced using workspace: protocol
e.g. "foo": "workspace:*",
and adding them to the notExternal array that is passed to the externalPlugin.

Info about workspaces

Copy link

codesandbox bot commented Jan 17, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@EdRW
Copy link
Author

EdRW commented Jan 17, 2025

Just wanted to add that this change doesn't add support for NPM workspaces, since NPM doesn't use the workspace: protocol.

Unfortunately this change won't resolve this issue.

Info about NPM workspaces

@EdRW EdRW changed the title feat: adds support for workspaces feat: adds support for workspace protocol Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import do not work when using workspaces
1 participant