Skip to content

Tracking issue for dependency optimization #608

Open

Description

@VanTanev

The starting point of @preconstruct/cli@2.8.9 - https://npmgraph.js.org/?q=%40preconstruct%2Fcli%402.8.9 - 164 dependencies

Activity

  1. VanTanev commented on Oct 16, 2024

    @VanTanev
    ContributorAuthor

    There are two options for chalk - we can either migrate to picocolors, but then the tests must include color codes - see 664680e#diff-6e2e2a1851648938b325ba84de634407a4e69a644ea61102df15ca4a8a7a9758

    Or, we could upgrade to the latest chalk which bundles its dependencies, but is ESM-only, with all the problems that brings. At the very least, we would need to do some changes to the jest config because it chokes on the chalk import statement, not sure what else.

  2. VanTanev commented on Oct 16, 2024

    @VanTanev
    ContributorAuthor

    parse-json is another ESM-only dependency in its latest version, so it might be worth considering making @preconstruct/cli ESM, and maybe migrating from jest to vitest? If the maintainers think this is worth pursuing, I will work on the related PRs.

  3. VanTanev commented on Oct 16, 2024

    @VanTanev
    ContributorAuthor

    btw, in terms of dependency-optimization, moving from babel to either esbuild-register or tsx, both of which use esbuild under the hood to do the live transpilation would bring the biggest benefit.

    Another nice side-effect of the above is that live transpilation will follow the rules in tsconfig.json, instead of needing a separate babel.config.js

    The second biggest would be to upgrade rollup plugins.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions