Skip to content

docs: remove deprecated devServer.inline references from HMR guide#2479

Merged
justin808 merged 5 commits intomasterfrom
claude/issue-1682-20250924-2356
Mar 9, 2026
Merged

docs: remove deprecated devServer.inline references from HMR guide#2479
justin808 merged 5 commits intomasterfrom
claude/issue-1682-20250924-2356

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Feb 23, 2026

Summary

  • remove stale devServer.inline guidance from HMR docs
  • align docs with current webpack-dev-server behavior

Closes #1682


Note

Low Risk
Documentation-only change that updates configuration guidance; no runtime behavior or APIs are modified.

Overview
Updates the HMR guide to remove deprecated devServer.inline/dev_server.inline guidance and references, and rewrites the related instructions/error examples to talk only about dev_server.hmr.

The config snippets and fallback advice are adjusted accordingly (set only hmr: true for client-side HMR; ensure hmr is false when using webpack-dev-server for both client/server bundles).

Written by Cursor Bugbot for commit 6bfdfa3. Configure here.

Summary by CodeRabbit

  • Documentation
    • Streamlined HMR guidance with clearer setup and simplified examples that no longer reference an inline option.
    • Consolidated error/troubleshooting notes into a single warning about a "window is not defined" issue when HMR and client/server bundles match.
    • Clarified rollback guidance and noted it affects only CSS hot updates.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Removed all references to the deprecated dev_server.inline / devServer.inline option from HMR documentation and examples. Docs now instruct configuring HMR solely via dev_server.hmr (e.g., hmr: true / false) and updated troubleshooting text to reference HMR-only ReferenceError scenarios.

Changes

Cohort / File(s) Summary
HMR docs
docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md
Removed dev_server.inline / devServer.inline mentions and related inline error guidance; updated examples and instructions to use only dev_server.hmr (hmr: true / false); adjusted troubleshooting text for ReferenceError when HMR and client share bundle.
Configuration README
docs/configuration/README.md
Removed inline: false from examples and guidance; updated wording to recommend toggling only dev_server.hmr (e.g., dev_server.hmr: false) where previously both hmr and inline were referenced.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 I munched the old inline line away,
Left hmr to sing and skip and play,
Docs now lean, no tangled thread,
Hot reload hops on—no dread,
A tidy trail where errors used to stay.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing deprecated devServer.inline references and updating the HMR guide documentation.
Linked Issues check ✅ Passed The PR fully addresses issue #1682 by removing deprecated devServer.inline references, updating HMR documentation, and reflecting current webpack-dev-server options with dev_server.hmr guidance.
Out of Scope Changes check ✅ Passed All changes are scoped to documentation updates directly related to removing deprecated inline references and updating HMR configuration guidance as specified in issue #1682.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-1682-20250924-2356

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 23, 2026

Greptile Summary

This PR removes deprecated devServer.inline configuration references from the HMR documentation. The changes align the guide with current webpack-dev-server behavior where the inline option has been removed in recent versions.

Changes made:

  • Removed all mentions of dev_server.inline / devServer.inline configuration
  • Removed the related error example: TypeError: Cannot read property 'prototype' of undefined
  • Updated YAML configuration example to only show hmr: true
  • Updated fallback advice to reference only hmr setting
  • Simplified server-side rendering error guidance to only mention HMR configuration

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Documentation-only change that removes deprecated configuration references; no code changes, no runtime impact, and aligns with current webpack-dev-server behavior
  • No files require special attention

Important Files Changed

Filename Overview
docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md Removes deprecated devServer.inline references and updates HMR configuration guidance to align with current webpack-dev-server behavior

Last reviewed commit: 6bfdfa3

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md (1)

45-54: Minor phrasing nit on line 45.

After dropping and \inline`, the instruction reads: *"set hmr dev_server` property to true"* — two backtick-wrapped identifiers appear back-to-back without connecting prose, which is slightly confusing.

✏️ Suggested rewording
-1. In `config/shakapacker.yml` set `hmr` `dev_server` property to true.
+1. In `config/shakapacker.yml`, set the `hmr` property under `dev_server` to `true`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md` around
lines 45 - 54, The phrase "set `hmr` `dev_server` property to true" is confusing
because two backticked identifiers are adjacent; update the wording to a clear
form such as "set the `hmr` property in `dev_server` to true" (or "set the
`dev_server` `hmr` property to true") so it unambiguously references the `hmr`
property within `dev_server`.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md`:
- Around line 45-54: The phrase "set `hmr` `dev_server` property to true" is
confusing because two backticked identifiers are adjacent; update the wording to
a clear form such as "set the `hmr` property in `dev_server` to true" (or "set
the `dev_server` `hmr` property to true") so it unambiguously references the
`hmr` property within `dev_server`.

@justin808 justin808 added the P3 Parked priority label Mar 5, 2026
@justin808 justin808 self-assigned this Mar 5, 2026
@justin808 justin808 added documentation docs-cleanup Documentation cleanup or migration labels Mar 8, 2026
@justin808 justin808 force-pushed the claude/issue-1682-20250924-2356 branch from 6bfdfa3 to 72055fa Compare March 9, 2026 00:38
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md`:
- Line 99: Replace the inconsistent devServer `hmr` phrasing with the YAML key
`dev_server.hmr` so the docs correctly instruct readers what to set in their
config; update the sentence that currently mentions devServer `hmr` to refer to
`dev_server.hmr` (and keep the note that this only affects CSS files) so the key
name matches the rest of the documentation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 20d13cce-62a1-45e9-8282-0cd357f9bec4

📥 Commits

Reviewing files that changed from the base of the PR and between 6bfdfa3 and 72055fa.

📒 Files selected for processing (1)
  • docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md

Comment thread docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md Outdated
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 9, 2026

Review

The removal of deprecated devServer.inline references is correct — this option was dropped in webpack-dev-server v4, so the docs were misleading anyone on a modern stack.

One concern: the cleanup is incomplete. Two other documentation files still reference inline in the context of dev_server configuration:

  1. docs/configuration/README.md — the comment on same_bundle_for_client_and_server still references dev_server.inline, and a YAML example still shows inline: false.

  2. docs/building-features/rails-webpacker-react-integration-options.md — a YAML snippet still shows inline: true.

These should be cleaned up in this PR or a follow-up to avoid contradicting the changes being made here. Inline comments below point to each location.

Minor: After removing the inline error case, the error list is down to a single bullet point. A one-item list is valid but reads a bit awkward — it could be flattened to a single sentence.

If you don't configure these two to false, you'll see errors like:
If you don't configure HMR to false, you'll see errors like:

- `ReferenceError: window is not defined` (if `hmr` is true)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With only one error case remaining, the bullet list feels unnecessary. Consider flattening to prose:

Suggested change
- `ReferenceError: window is not defined` (if `hmr` is true)
If `hmr` is `true` in this configuration, you will see: `ReferenceError: window is not defined`

justin808 and others added 2 commits March 8, 2026 18:39
- Remove all references to devServer.inline which no longer exists in webpack 5
- Update configuration examples to only show hmr setting
- Simplify error messages section
- Fix phrasing for clarity (review feedback)

Fixes #1682

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Use dev_server.hmr notation for consistency with shakapacker.yml
- Flatten single-item bullet list to inline prose

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@justin808 justin808 force-pushed the claude/issue-1682-20250924-2356 branch from 72055fa to 7526a27 Compare March 9, 2026 04:39
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 9, 2026

The second commit addressing the phrasing feedback is good — the HMR guide file is now clean.

Still outstanding from my previous review: the devServer.inline cleanup is incomplete. Three more files still need updating:

  1. docs/configuration/README.md:186 — comment says dev_server.inline set to false
  2. docs/configuration/README.md:821 — YAML example still shows inline: false
  3. docs/building-features/rails-webpacker-react-integration-options.md:101 — YAML snippet shows inline: true

New finding: docs/getting-started/tutorial.md:143 also tells readers to verify the inline option is true in shakapacker.yml — this contradicts the changes in this PR and should be removed.

All four are straightforward one-liner removals/edits. Happy to approve once those are addressed.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md (1)

32-97: ⚠️ Potential issue | 🟠 Major

Update configuration documentation to address dev_server.inline inconsistency.

The HMR guide removes all references to dev_server.inline as deprecated, but docs/configuration/README.md (line 186) still instructs users to set both dev_server.hmr and dev_server.inline to false when using same_bundle_for_client_and_server.

If inline is deprecated or no longer supported, the configuration documentation must be updated to remove this outdated guidance. Otherwise, users following both guides will receive conflicting instructions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md`
around lines 32 - 97, The docs are inconsistent: the HMR guide removes
dev_server.inline but the configuration README still tells users to set
dev_server.inline to false; update the configuration README text to remove or
mark dev_server.inline as deprecated so it no longer instructs users to toggle
dev_server.inline when using same_bundle_for_client_and_server, and instead only
reference dev_server.hmr (or explicitly note that dev_server.inline is
deprecated/unsupported) so both guides consistently refer to dev_server.hmr and
the deprecation state of dev_server.inline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md`:
- Around line 32-97: The docs are inconsistent: the HMR guide removes
dev_server.inline but the configuration README still tells users to set
dev_server.inline to false; update the configuration README text to remove or
mark dev_server.inline as deprecated so it no longer instructs users to toggle
dev_server.inline when using same_bundle_for_client_and_server, and instead only
reference dev_server.hmr (or explicitly note that dev_server.inline is
deprecated/unsupported) so both guides consistently refer to dev_server.hmr and
the deprecation state of dev_server.inline.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1193c48d-5bd5-4598-ab93-9834bab730d1

📥 Commits

Reviewing files that changed from the base of the PR and between 72055fa and 7526a27.

📒 Files selected for processing (1)
  • docs/building-features/hmr-and-hot-reloading-with-the-webpack-dev-server.md

@justin808
Copy link
Copy Markdown
Member Author

Addressed the dev_server.inline inconsistency noted in CodeRabbit review #pullrequestreview-3912843361.

Changes in commit ffaf7361b:

  • Updated the initializer guidance to only require dev_server.hmr = false when same_bundle_for_client_and_server = true
  • Removed inline: false from the YAML example in the same section

This aligns docs/configuration/README.md with the updated HMR docs and avoids contradictory setup instructions.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 9, 2026

Review: docs: remove deprecated devServer.inline references

The changes here are correct — devServer.inline was removed in webpack-dev-server v4, so removing these references is the right call.

Two missed locations with stale inline references:

  1. docs/getting-started/tutorial.md line 143 (not updated in this PR):

    "First, check that the hmr and the inline options are true in your config/shakapacker.yml file."

    Should be updated to remove the inline mention, e.g.:

    "First, check that the hmr option is true under dev_server in your config/shakapacker.yml file."

  2. docs/building-features/rails-webpacker-react-integration-options.md lines 100–101 (not updated in this PR):

    dev_server:
      hmr: true
      inline: true   # ← still present, should be removed

These two files should be updated as part of this cleanup to keep the documentation consistent.

Minor wording nit (not a blocker): In the HMR doc at the section heading "If you use the same Webpack setup for your server and client bundles", the updated prose ("If hmr is true in this configuration, you will see: ReferenceError: window is not defined") is a bit terse — the old version made it clearer that the constraint applies specifically when using the same bundle for client and server. Consider a slightly expanded form like: "If hmr is true when using the same bundle for client and server, you will see: ReferenceError: window is not defined."


- `ReferenceError: window is not defined` (if `hmr` is true)
- `TypeError: Cannot read property 'prototype' of undefined` (if `inline` is true)
If `hmr` is `true` in this configuration, you will see: `ReferenceError: window is not defined`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The prose here is a bit terse without its prior context. The reader may not realize this constraint only applies to the same-bundle-for-client-and-server scenario described above. Consider:

Suggested change
If `hmr` is `true` in this configuration, you will see: `ReferenceError: window is not defined`
If `hmr` is `true` when using the same bundle for client and server, you will see: `ReferenceError: window is not defined`

Add context about "same bundle for client and server" to the HMR error
message so readers understand when the ReferenceError applies.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 9, 2026

Review: docs: remove deprecated devServer.inline references from HMR guide

Good cleanup overall — removing the stale devServer.inline references is correct since this option was deprecated in webpack-dev-server v4 and removed in v5. The changes are accurate and well-targeted.

One missed reference: docs/building-features/rails-webpacker-react-integration-options.md (line 101) still contains inline: true in its HMR configuration snippet. This file was not part of this PR's diff but is in the same docs/ tree and will leave users with conflicting guidance.

Minor note: The updated error message on line 35 of the HMR guide now only mentions the hmr: true / ReferenceError: window is not defined case. The removed TypeError: Cannot read property 'prototype' of undefined was specifically tied to inline: true — dropping it makes sense here, but worth confirming this error no longer occurs with current webpack-dev-server versions.

Otherwise the changes are clean, the yaml snippets and prose are consistent, and the overall direction is correct.

… doc

Aligns with the HMR guide cleanup by removing the last remaining
inline: true reference in the docs tree.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@justin808 justin808 merged commit aedb543 into master Mar 9, 2026
7 checks passed
@justin808 justin808 deleted the claude/issue-1682-20250924-2356 branch March 9, 2026 07:54
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 9, 2026

REVIEW: docs: remove deprecated devServer.inline references from HMR guide

Summary: Documentation-only cleanup removing the deprecated devServer.inline / dev_server.inline option from HMR guides. This is a correct and well-scoped change.

Accuracy

The devServer.inline option was removed in webpack-dev-server v4 (it toggled between inline and iframe mode in v3; v4 dropped iframe mode entirely). Removing it from all three doc files is correct.

Changes look correct

  • hmr-and-hot-reloading-with-the-webpack-dev-server.md — The two-error bullet list is consolidated into a single sentence covering only the still-relevant ReferenceError: window is not defined when hmr: true is used with same-bundle SSR. The dropped TypeError: Cannot read property prototype of undefined (the inline-specific error) is no longer applicable.
  • rails-webpacker-react-integration-options.mdinline: true removed from the YAML snippet. The remaining hmr: true is the correct minimal config.
  • docs/configuration/README.md — Both the comment and the YAML block for same_bundle_for_client_and_server correctly drop inline: false; only hmr: false needs to be documented here.

Minor observation

In hmr-and-hot-reloading-with-the-webpack-dev-server.md line 35, the error is now rendered as an inline sentence rather than a distinct callout. The original bullet list was slightly easier to scan. Consider a blockquote or a Warning admonition for better visibility — but this is purely a style preference and not a blocker.

Verdict

LGTM. Accurate, minimal, and directly addresses the stale guidance from issue #1682. No runtime behavior is affected.

justin808 added a commit that referenced this pull request Mar 9, 2026
## Summary

- Add changelog entries for 6 user-visible PRs merged since v16.4.0.rc.6
that were missing from `[Unreleased]`
- Update existing #2561 entry to include #2568 contributor credit

### New entries added

| Section | PR | Description |
|---|---|---|
| Added | #2539 | Environment-variable-driven ports in Procfile
templates |
| Fixed | #2417 | Rspack generator config path fix |
| Fixed | #2419 | Precompile hook load-based execution fix |
| Fixed | #2577 | `create-react-on-rails-app` validation improvements |
| Pro Fixed | #2416 | StreamResponse status fallback fix |
| Pro Fixed | #2566 | Empty-string license plan mismatch fix |

### Skipped PRs (not user-visible)

Docs (#2406, #2414, #2479, #2494, #2518, #2537, #2544), CI/internal
(#2533, #2547, #2555, #2557, #2558, #2564), dependabot (#2387, #2541),
dev dependencies (#2559, #2569, #2573).

## Test plan

- [ ] Verify changelog formatting matches existing entries
- [ ] Verify all user-visible PRs since v16.4.0.rc.6 are covered

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only changelog updates with no runtime or build behavior
changes.
> 
> **Overview**
> Updates `CHANGELOG.md`’s **[Unreleased]** section to include
previously missing user-facing entries: Procfile templates now support
env-driven ports, several generator/`bin/dev` precompile-hook and
rspack-path fixes are documented, and `create-react-on-rails-app`
validation improvements are noted.
> 
> Also adds two Pro fix entries (StreamResponse status fallback and
license plan empty-string validation) and updates the existing `bin/dev`
precompile-hook entry to credit an additional PR/contributor.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e75d2b5. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-cleanup Documentation cleanup or migration documentation P3 Parked priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update HMR docs

1 participant