Skip to content

docs: refresh getting-started and guides - #1478

Merged
dannyhw merged 5 commits into
callstack:mainfrom
gedu:docs/getting-started-refresh
Oct 8, 2026
Merged

dannyhw merged 5 commits into
callstack:mainfrom
gedu:docs/getting-started-refresh

Conversation

@gedu

@gedu gedu commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Went through the getting-started section and the guides and checked what they say against what the code does. Two commits: one per section.

Test plan

pnpm build inside website passes, 53 pages.

gedu added 2 commits October 7, 2026 11:53
The quick start asked for Node >= 20 while the packages declare node >= 18
and CI tests Node 18 through 26. Node 20 is itself past its end of life, so
the recommendation now points at 22. The React Native >= 0.77.0 bullet
contradicted the support policy two lines below it, so it is dropped and the
policy is left to speak for itself.

Also removes docs/getting-started/bundlers.md, a stub containing only a
heading. It has no sidebar entry but rspress still published and sitemapped
it at /docs/getting-started/bundlers.
A pass over every page in the guides section, checking what it says against
what the code does.

`getAssetsTransformRules` and `ReactNative.ASSET_EXTENSIONS` never existed:
the helper is `getAssetTransformRules` and both utilities are exported as
`Repack.*`. The configuration guide imports a `repack` package that is not
published and shows a `--mode` flag the CLI does not have, since the mode
comes from `--dev`. The remote assets guide left out the `assets` segment the
URL always carries, and the custom `assetPath` sample called an undefined
`getCustomHash`. Two samples had broken bracket nesting and used `path` and
`context` without importing them.

Links: the Zephyr recipe moved to /bundlers/repack, bundle-discovery's
Re.Pack.md is now a docs page, `rspack.dev/config.html` is a 404, and the
assets-loader anchor in the SVG guide pointed at a heading that does not
exist. The `RsdoctorPlugin` name in the analysis guide never shipped; the
plugins are `RsdoctorRspackPlugin` and `RsdoctorWebpackPlugin`.

Plus the typos each page picked up along the way.
@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

@gedu is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f65157a

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

@dannyhw dannyhw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

automated review: Checked the guide changes against the code and live links. The helper renames, --dev precedence, remote asset URL (/assets/ segment, __packager_asset: true), sample fixes and link replacements are all correct. Three minor nits inline.

Comment thread website/src/latest/docs/guides/configuration.mdx Outdated
Comment thread website/src/latest/docs/guides/bundle-analysis.mdx Outdated
Comment thread website/src/latest/docs/guides/svg.md Outdated
Comment thread website/src/latest/docs/guides/remote-assets.md Outdated
gedu added 3 commits October 7, 2026 21:30
Rspack now serves from rspack.rs and Rsdoctor from rsdoctor.rs; the old
domains only answer with a 301, so every link here was paying a redirect.

A domain swap alone is not enough, because some paths moved as well and
currently 404 after the redirect:

- `/plugins/rspack/swc-js-minimizer-rspack-plugin` and
  `/plugins/webpack/module-federation-plugin-v1` lost their `/rspack` and
  `/webpack` segment.
- The `Rule.test`, `Rule.include`, `Rule.exclude` and `Condition` sections
  moved out of `/config/module` into `/config/module-rules`, so those four
  anchors in the SVG guide would have silently stopped jumping anywhere.

The rspack.config templates are included because `repack-init` downloads
them into new projects and the docs pages also embed them verbatim, so the
stale URL reached both users and the published site.
The sample called an undefined `getCustomHash`, and the version added to
define it hashed the literal `"some-content"`, so every asset got the same
URL and the name never changed with the file.

The example is there to show path construction, so it now only builds a
path, and cache-busting moved to a tip next to it. The tip gives the exact
expression instead of a placeholder, because `assetPath` never receives the
asset contents: hashing it means reading the file yourself. It also states
the two properties that are not visible from the snippet and cannot be
worked around inside `assetPath` — the call is synchronous, so the read has
to be too, and it runs once per request against the base file while the
`@2x`/`@3x` variants reuse the returned path.
The tip addresses readers who do not have an Assets loader rule yet, so the
section they need is the one that shows adding it. `#excluding-assets`
repeats the SVG exclusion the page already shows directly above the tip, so
following the link answered a question the reader did not have.

The link used to name `#migrating-from-assetsplugin`, a section v5 no longer
has; repairing that dead anchor by picking the closest-sounding heading kept
it pointing at the wrong place.
@gedu gedu self-assigned this Oct 8, 2026

@dannyhw dannyhw left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work, thank you!

@dannyhw
dannyhw merged commit 6af7cce into callstack:main Oct 8, 2026
3 of 4 checks passed
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.

2 participants