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

fix(storybook): update Babel configuration #702

Merged
merged 2 commits into from
Mar 8, 2024
Merged

Conversation

daneah
Copy link
Member

@daneah daneah commented Mar 8, 2024

This change: (check at least one)

  • Adds a new feature
  • Fixes a bug
  • Improves maintainability
  • Improves documentation
  • Is a release activity

Is this a breaking change? (check one)

  • Yes
  • No

Is the: (complete all)

  • Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
  • Test suite(s) passing?
  • Code coverage maximal?
  • Changeset added?
  • Component status page up to date?

What does this change address?
The React Storybook is failing to build because when Storybook attempts to build, it looks for a Babel configuration, and for story files it's ascending and finding the root babel.config.js file and using only its configuration. Namely, this doesn't include the React preset, and the build fails to understand JSX syntax as a result.

How does this change work?
Storybook offers a babel function for manipulating the Babel configuration as a preferred approach, so this change moves the desired configuration to the Storybook config and deletes the root Babel config file, which was added mainly to appease the build earlier on.

Additional context

  • Also bumped Storybook + addons to the latest v7 release.
  • Also added Netlify status badges to the README so these things go unnoticed less often.

The React Storybook is failing to build because when Storybook attempts
to build, it looks for a Babel configuration, and for story files it's
ascending and finding the root `babel.config.js` file and using only its
configuration. Namely, this doesn't include the React preset, and the
build fails to understand JSX syntax as a result.

Storybook offers a `babel` function for manipulating the Babel
configuration as a preferred approach, so this change moves the desired
configuration to the Storybook config and deletes the root Babel config
file, which was added mainly to appease the build earlier on.

- Also bumped Storybook + addons to the latest v7 release.
- Also added Netlify status badges to the README so these things go
  unnoticed less often.
@daneah daneah requested a review from a team as a code owner March 8, 2024 15:03
@daneah daneah requested review from brentswisher, sirrah-tam and mtorres3 and removed request for a team March 8, 2024 15:03
Copy link

changeset-bot bot commented Mar 8, 2024

⚠️ No Changeset found

Latest commit: 67b5132

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 8, 2024

size-limit report 📦

Path Size
packages/pharos/lib/index.js 54.45 KB (0%)

@daneah daneah merged commit 6894e26 into develop Mar 8, 2024
11 checks passed
@daneah daneah deleted the fix/storybook-build branch March 8, 2024 15:25
daneah added a commit that referenced this pull request Mar 8, 2024
* develop: (77 commits)
  chore(deps): update GitHub Actions and Node versions (#704)
  fix(site): use Pharos v14 properties (#703)
  fix(storybook): update Babel configuration (#702)
  fix(infra): use Node 18 in .nvmrc (#701)
  fix(infra): update dependencies
  fix(infra): allow mutable Yarn lockfile during release for workspaces versions
  Version Packages (#700)
  Release/14.0.0 (#697)
  chore(deps): upgrade to Yarn 4 (#694)
  chore(deps): bump es5-ext from 0.10.62 to 0.10.64 (#692)
  fix(icon): add media query style for WHCM (#689)
  chore(deps): bump ip from 1.1.8 to 1.1.9 (#687)
  chore: version packages (#685)
  Icon: Add "add to folder" icon (#678)
  Fix the all-contributors badge (#680)
  Update link, dropdown-menu-nav, and popover to use a11y-label (#675)
  DropdownMenuNav: Add pharos-elevation-level-3 token (#670)
  chore(deps-dev): bump vite from 4.3.9 to 4.5.2 (#672)
  chore: version packages (#667)
  Update deprecated a11y attributes in button component (#666)
  ...
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