Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webpacker guides after version upgrade [ci-skip] #43152

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

abhaynikam
Copy link
Contributor

Couple things in the webpacker guide weren't correct. Since guides point to the Rails Edge version I thought we should rectify the guides.

PR fixes following things:

  • Webpacker doesn't support framework installer neither does the Rails app generator now. We have removed that section in the PR. This PR removes the installer: Compatibility with Webpack 5 webpacker#2802
  • Webpacker won't be a default in the Rails 7 and installation step had mentioned few things which weren't accurate as the per the Rails 7 plan we have seen. Updated the details about installation.
  • Webpacker has removed guides for engine support. I am not aware what is the plan for engine support but since guides link was not valid we have removed the mention for workaround.

@rails-bot rails-bot bot added the docs label Sep 2, 2021
Copy link
Member

@jonathanhefner jonathanhefner left a comment

Choose a reason for hiding this comment

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

Good catch! 👍 When you're happy with the changes, would you mind squashing the commits?

@@ -51,7 +51,7 @@ To use Webpacker, you must install the Yarn package manager, version 1.x or up,

NOTE: Webpacker depends on NPM and Yarn. NPM, the Node package manager registry, is the primary repository for publishing and downloading open-source JavaScript projects, both for Node.js and browser runtimes. It is analogous to rubygems.org for Ruby gems. Yarn is a command-line utility that enables the installation and management of JavaScript dependencies, much like Bundler does for Ruby.

Webpacker is installed by default in Rails 6.0 and up. You can install it with a new project in some older versions by adding `--webpack` to the `rails new` command. Webpacker can be added in an existing project by running `bin/rails webpacker:install`. This installation command creates the following local files:
Webpacker is installed with a new project by adding `--webpack` to the `rails new` command. Webpacker can be added in an existing project by running `bin/rails webpacker:install`. This installation command creates the following local files:
Copy link
Member

Choose a reason for hiding this comment

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

Since the webpacker:install task is not part of Rails by default, I wanted to clarify these instructions. What do you think about the following rewording?

Suggested change
Webpacker is installed with a new project by adding `--webpack` to the `rails new` command. Webpacker can be added in an existing project by running `bin/rails webpacker:install`. This installation command creates the following local files:
To include Webpacker in a new project, add `--webpack` to the `rails new` command. To add Webpacker to an existing project, add the `webpacker` gem to the project's `Gemfile`, run `bundle install`, and then run `bin/rails webpacker:install`.
Installing Webpacker creates the following local files:

@jonathanhefner jonathanhefner changed the title Update webpacker guides after version upgrade Update webpacker guides after version upgrade [ci-skip] Sep 2, 2021
…ult install webpacker

Webpacker gem has removed the framework installer and Rails app installer has removed the support to pass the framework names to webpack option

Webpacker engine guides are removed
@abhaynikam
Copy link
Contributor Author

@jonathanhefner Addressed the comment and squashed commits in one. Thanks 👍🏼 😊

@jonathanhefner jonathanhefner merged commit 2cc0aca into rails:main Sep 2, 2021
@jonathanhefner
Copy link
Member

Thank you, @abhaynikam! 🙌

@abhaynikam abhaynikam deleted the update-webpacker-guides branch September 3, 2021 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants