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 5 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 78.7 MB 78.7 MB 0 B - 0%
initSize 147 MB 146 MB -782 kB -Infinity -0.5%
diffSize 68.3 MB 67.5 MB -782 kB -Infinity -1.2%
buildSize 6.79 MB 6.79 MB 0 B - 0%
buildSbAddonsSize 1.5 MB 1.5 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.83 MB 1.83 MB 0 B - 0%
buildSbPreviewSize 270 kB 270 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.8 MB 3.8 MB 0 B - 0%
buildPreviewSize 2.99 MB 2.99 MB 0 B - 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 7.1s 5.2s -1s -818ms -Infinity 🔰-34.4%
generateTime 24.9s 18.3s -6s -637ms -Infinity 🔰-36.2%
initTime 14.9s 11.9s -2s -930ms -Infinity 🔰-24.4%
buildTime 7.8s 9.4s 1.6s Infinity 🔺17.4%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 7.2s 6.1s -1s -58ms -Infinity 🔰-17.2%
devManagerResponsive 4.8s 3.8s -1s -Infinity 🔰-26.1%
devManagerHeaderVisible 768ms 677ms -91ms -Infinity 🔰-13.4%
devManagerIndexVisible 813ms 705ms -108ms -Infinity 🔰-15.3%
devStoryVisibleUncached 1.2s 871ms -414ms -Infinity 🔰-47.5%
devStoryVisible 811ms 703ms -108ms -Infinity 🔰-15.4%
devAutodocsVisible 574ms 579ms 5ms Infinity 0.9%
devMDXVisible 608ms 560ms -48ms -Infinity 🔰-8.6%
buildManagerHeaderVisible 658ms 539ms -119ms -Infinity 🔰-22.1%
buildManagerIndexVisible 661ms 542ms -119ms -Infinity 🔰-22%
buildStoryVisible 695ms 589ms -106ms -Infinity 🔰-18%
buildAutodocsVisible 587ms 513ms -74ms -Infinity 🔰-14.4%
buildMDXVisible 511ms 581ms 70ms Infinity 🔺12%

@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 5cdd6bc. 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