Skip to content

Rewrite as a Rails-free Webpack 5 CLI (1.0.0) - #1

Merged
danielpclark merged 1 commit into
masterfrom
claude/ecstatic-planck-kfmxc3
Sep 29, 2026
Merged

danielpclark merged 1 commit into
masterfrom
claude/ecstatic-planck-kfmxc3

Conversation

@danielpclark

Copy link
Copy Markdown
Owner

Summary

Webpacker is abandoned, and 0.x depended on it via a mocked Rails app. This rewrite removes that layer and drives Webpack 5 directly.

  • No runtime gem dependencies (removed webpacker, tty-command, bundler, and the Rails mock).
  • init generates config/webpacker.yml, an editable config/webpack/webpack.config.js, an entry pack, and a package.json with tooling pinned by major version (webpack ^5, webpack-cli ^6, etc.). Existing files are kept unless --force.
  • Commands: init, compile, watch, clobber, check, info, version.
  • Keeps Webpacker's conventions: webpacker.yml keys, app/javascript/packs entries, hashed output and a flat public/packs/manifest.json.
  • Environment is read from WEBPACKER_ENV, NODE_ENV or RAILS_ENV (default development, as Webpacker did).
  • Replaced Travis with GitHub Actions; rewrote README (includes a 0.x migration note).

Breaking changes

  • webpacker:* rake tasks, Gemfile, Rakefile, bin/rails, config/application.rb and config/webpack/loaders are no longer generated; custom loaders move into webpack.config.js.
  • Requires Ruby >= 3.0 and Node >= 20.9.

Test plan

  • Unit tests pass via ruby -Ilib -Itest (7 runs, 1 skipped)
  • End-to-end test (WEBPACKER_CLI_E2E=1): real init + production compile, manifest verified
  • Manual: CSS + SVG asset build, check, info, clobber
  • rake test and the new GitHub Actions workflow have not been run (rake unavailable in the dev container)

🤖 Generated with Claude Code

https://claude.ai/code/session_01LaJESXoiQCpeTydMCJ37uU


Generated by Claude Code

Drop the webpacker/Rails mock and 0.x rake tasks. init now generates
webpacker.yml, a webpack.config.js, an entry pack and package.json with
major-pinned Webpack 5 tooling; compile/watch/clobber/check/info drive
Webpack directly and keep Webpacker's manifest.json output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaJESXoiQCpeTydMCJ37uU
@semanticdiff-com

semanticdiff-com Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  .github/workflows/ci.yml  0% smaller
  .travis.yml  0% smaller
  Gemfile Unsupported file format
  README.md Unsupported file format
  bin/webpacker-cli Unsupported file format
  lib/webpacker_cli.rb Unsupported file format
  lib/webpacker_cli/rails_template.rb Unsupported file format
  lib/webpacker_cli/templates/application.js  0% smaller
  lib/webpacker_cli/templates/package.json  0% smaller
  lib/webpacker_cli/templates/webpack.config.js  0% smaller
  lib/webpacker_cli/templates/webpacker.yml  0% smaller
  lib/webpacker_cli/version.rb Unsupported file format
  test/test_helper.rb Unsupported file format
  test/webpacker_cli_test.rb Unsupported file format
  webpacker_cli.gemspec Unsupported file format

@danielpclark
danielpclark merged commit 76809cc into master Sep 29, 2026
24 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