Skip to content

feat: adds support for workspace protocol#46

Open
EdRW wants to merge 1 commit into
egoist:mainfrom
EdRW:main
Open

feat: adds support for workspace protocol#46
EdRW wants to merge 1 commit into
egoist:mainfrom
EdRW:main

Conversation

@EdRW

@EdRW EdRW commented Jan 17, 2025

Copy link
Copy Markdown

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

@codesandbox

codesandbox Bot commented Jan 17, 2025

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@EdRW

EdRW commented Jan 17, 2025

Copy link
Copy Markdown
Author

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