react
react copied to clipboard
Use primer/react-scripts toolchain
Part of the toolchain for component development

Before we start asking other teams to start using the toolchain, we should use it in internal repos to test the experience
Replaces local storybook setup with primer/react-scripts. Still allows for project specific customisation. See .storybook/main.js
and .storybook/preview.js
~The canary version is intentional, @primer/react-scripts is still a proof of concept and does not publish a stable version yet. The package name and script name might change.~ Now using stable version :)
Similar PR in memex: https://github.com/github/memex/pull/9638
⚠️ No Changeset found
Latest commit: 5d015420b144e1f3758180db74fb75efb1374fe8
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
size-limit report 📦
Path | Size |
---|---|
dist/browser.esm.js | 67.58 KB (-0.03% 🔽) |
dist/browser.umd.js | 67.98 KB (+0.01% 🔺) |
Circular dependency problem:
@primer/react-scripts
has a peer dependency on @primer/react
, so when we import something from @primer/react
in this repo (primer/react) it wouldn't exist because we don't want to install another copy of primer/react 😅
ModuleNotFoundError: Module not found: Error: Can't resolve '@primer/react/lib-esm/utils/story-helpers' in '/Users/sid/code/primer/react/node_modules/@primer/react-scripts/storybook'
Update: Fixed by creating a primer/react specific version of preview.js
.
Update2: @colebemis's suggestion of using webpack alias worked great! ✨
@colebemis Do you know why CI is failing on this, looks like an unrelated change but it doens't fail on main 🤔
Could be because of a potential eslint version change?
@colebemis Do you know why CI is failing on this, looks like an unrelated change but it doens't fail on main 🤔
Could be because of a potential eslint version change?
Huh, I wonder if it's related to these changes: https://github.com/primer/react/pull/2083
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.