react icon indicating copy to clipboard operation
react copied to clipboard

Use primer/react-scripts toolchain

Open siddharthkp opened this issue 2 years ago • 6 comments

Part of the toolchain for component development

puppers eating food

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

siddharthkp avatar Apr 25 '22 12:04 siddharthkp

⚠️ 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

changeset-bot[bot] avatar Apr 25 '22 12:04 changeset-bot[bot]

size-limit report 📦

Path Size
dist/browser.esm.js 67.58 KB (-0.03% 🔽)
dist/browser.umd.js 67.98 KB (+0.01% 🔺)

github-actions[bot] avatar Apr 25 '22 12:04 github-actions[bot]

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! ✨

siddharthkp avatar Apr 25 '22 13:04 siddharthkp

@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?

siddharthkp avatar May 25 '22 14:05 siddharthkp

@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

colebemis avatar Jun 02 '22 19:06 colebemis

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.

github-actions[bot] avatar Sep 17 '22 10:09 github-actions[bot]