Skip to content

Packages that ship unbundled source fail with a dependency cycle #53

Description

@tomayac

Managing a package that ships unbundled source rather than pre-bundled dist files fails the build:

cosPlugin({ packages: [/^svelte(\/|$)/] })
[cos] dependency cycle between managed packages:
  svelte/src/legacy/legacy-client.js -> …/reactivity/sources.js -> …/proxy.js
  -> …/dev/tracing.js -> …/runtime.js -> …/reactivity/effects.js
  -> …/dom/operations.js -> …/reactivity/batch.js -> …/reactivity/effects.js

cos-externalise-deps externalizes every import that has an importer, including relative ones, so the unit of chunking is the resolved module, not the package. Svelte's internals import each other circularly (effects.jsbatch.js), and a cycle can't be hashed bottom-up.

I looked at it in #52, but decided I don't understand it enough to open a PR, so reporting an Issue instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions