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

Next.js-Vite: Fix vite plugin exports #29046

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Sep 4, 2024

Closes N/A

What I did

I have fixed a wrong set of export fields in @storybook/experimental-nextjs-vite package.json

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 76.5 MB 76.5 MB 50 B 2.05 0%
initSize 161 MB 161 MB -97.8 kB -2 -0.1%
diffSize 84.7 MB 84.6 MB -97.9 kB -2.26 -0.1%
buildSize 7.48 MB 7.48 MB 0 B -1.26 0%
buildSbAddonsSize 1.62 MB 1.62 MB 0 B 2.17 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.31 MB 2.31 MB 0 B -2.38 0%
buildSbPreviewSize 352 kB 352 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.47 MB 4.47 MB 0 B 2.04 0%
buildPreviewSize 3 MB 3 MB 0 B -1.32 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 9.2s 6.8s -2s -399ms -1.2 -34.8%
generateTime 24.1s 20.7s -3s -359ms -0.41 -16.2%
initTime 19.7s 16.2s -3s -483ms -1 -21.4%
buildTime 11.6s 10.8s -813ms -1.01 -7.5%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.1s 6.7s 652ms -0.22 9.6%
devManagerResponsive 3.9s 3.9s -11ms -0.91 -0.3%
devManagerHeaderVisible 665ms 969ms 304ms 1.56 🔺31.4%
devManagerIndexVisible 703ms 1s 319ms 1.64 🔺31.2%
devStoryVisibleUncached 1.2s 1.5s 284ms 0.82 18.6%
devStoryVisible 704ms 1s 319ms 1.66 🔺31.2%
devAutodocsVisible 603ms 958ms 355ms 2.06 🔺37.1%
devMDXVisible 643ms 653ms 10ms -0.42 1.5%
buildManagerHeaderVisible 659ms 1.2s 573ms 7.28 🔺46.5%
buildManagerIndexVisible 665ms 1.2s 569ms 7.81 🔺46.1%
buildStoryVisible 695ms 1.2s 604ms 4.72 🔺46.5%
buildAutodocsVisible 572ms 975ms 403ms 2.8 🔺41.3%
buildMDXVisible 563ms 998ms 435ms 6.3 🔺43.6%

Greptile Summary

Updated export fields in package.json for @storybook/experimental-nextjs-vite to improve module resolution and compatibility.

  • Modified 'vite-plugin' export in code/frameworks/experimental-nextjs-vite/package.json to use .mjs for 'import' and .js for 'require'
  • Change aims to enhance compatibility with different module systems in Next.js-Vite framework
  • No changes to other Storybook packages or components

@valentinpalkovic valentinpalkovic marked this pull request as ready for review September 4, 2024 11:03
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Sep 4, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b2c4baa. 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 2 targets

Sent with 💌 from NxCloud.

@valentinpalkovic valentinpalkovic merged commit 75664a0 into next Sep 5, 2024
62 of 70 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-nextjs-exports branch September 5, 2024 07:23
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.

2 participants