Skip to content

[#387] Update Storybook nextConfigPath to support node modules #392

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

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

mqwebster-nava
Copy link
Contributor

Ticket

Resolves #387

Changes

  • Updated .storybook/main.js => .storybook/main.mjs based on ECMAScript Modules instead of CommonJS
    • .storybook/main.mjs:
      path.resolve(import.meta.dirname, "../next.config.js")
      

Context for reviewers

Originally made an update to Storybook in #388 meant to address #387. Making these changes caused issues in platform-test-nextjs.

The steps taken to resolve are in this PR.

Testing

Making this change in platform-test-nextjs resulted in a successful app build (save for a vulnerability scan). This change also follows Node.js documentation on what they recommend to use in place of __dirname.

@mqwebster-nava mqwebster-nava requested a review from lorenyu April 11, 2025 21:49
Copy link
Contributor

@lorenyu lorenyu left a comment

Choose a reason for hiding this comment

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

beautiful thanks

@mqwebster-nava mqwebster-nava merged commit 4e2e621 into main Apr 14, 2025
1 check passed
@mqwebster-nava mqwebster-nava deleted the mqwebster/storybook-modules-update branch April 14, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook not resolving __dirname path
2 participants