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

ESM: Ability to generate ESM-only for select entrypoints in core #29320

Draft
wants to merge 9 commits into
base: norbert/esm-runtime
Choose a base branch
from

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Oct 10, 2024

What I did

I made a step towards ESM-only.

  • The core package now only generates ESM for cli/bin & cli/index entrypoints.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 720 B -0.71 0%
initSize 146 MB 145 MB -783 kB -2.95 -0.5%
diffSize 68.5 MB 67.7 MB -784 kB -5.67 -1.2%
buildSize 7.1 MB 7.1 MB -209 B 0.71 0%
buildSbAddonsSize 1.79 MB 1.79 MB -51 B 0.71 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.85 MB 1.85 MB -123 B 0.69 0%
buildSbPreviewSize 271 kB 271 kB -17 B 0.67 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.1 MB 4.1 MB -191 B 0.71 0%
buildPreviewSize 3 MB 3 MB -18 B 0.69 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 8.8s 19.4s 10.5s 11.16 🔺54.2%
generateTime 20.8s 26.5s 5.7s 2.3 🔺21.5%
initTime 13.5s 17s 3.4s 4.81 🔺20.6%
buildTime 9.5s 8.5s -982ms -0.34 -11.5%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 7.6s 7s -554ms -1.95 🔰-7.8%
devManagerResponsive 5.3s 4.8s -471ms -1.22 -9.7%
devManagerHeaderVisible 674ms 761ms 87ms 0.23 11.4%
devManagerIndexVisible 742ms 809ms 67ms -0.06 8.3%
devStoryVisibleUncached 1.2s 1.2s -59ms -1.95 -4.9%
devStoryVisible 706ms 807ms 101ms 0.32 12.5%
devAutodocsVisible 592ms 703ms 111ms 2.32 🔺15.8%
devMDXVisible 588ms 660ms 72ms 0.54 10.9%
buildManagerHeaderVisible 670ms 675ms 5ms -0.21 0.7%
buildManagerIndexVisible 686ms 693ms 7ms 0.09 1%
buildStoryVisible 668ms 679ms 11ms -0.7 1.6%
buildAutodocsVisible 572ms 596ms 24ms 0.47 4%
buildMDXVisible 564ms 636ms 72ms 1.98 🔺11.3%

@ndelangen ndelangen changed the title demonstrate the ability to generate ESM only for a select set of entrypoints in core ESM: Ability to generate ESM-only for select entrypoints in core Oct 10, 2024
Copy link

nx-cloud bot commented Oct 10, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ce6cdcb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

ndelangen added a commit that referenced this pull request Oct 10, 2024
@ndelangen ndelangen self-assigned this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant