Skip to content

Commit 036bbb8

Browse files
authored
Update readme rails 7 (#3260)
* Update README.md Installation for rails v7 changed. * Update TOC
1 parent aba7963 commit 036bbb8

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,29 @@ leaving Webpack responsible solely for app-like JavaScript, or it can be used ex
1515

1616
**NOTE:** The master branch now hosts the code for v6.x.x. Please refer to [5-x-stable](https://github.com/rails/webpacker/tree/5-x-stable) branch for 5.x documentation.
1717

18+
Visit [Shipping Webpacker v6 – Status](https://discuss.rubyonrails.org/t/shipping-webpacker-v6-status/79683) for the latest news on a v6 release.
19+
1820
Pleaes see the [new rails/webpacker discussion forum](https://discuss.rubyonrails.org/c/webpacker/10) to discuss debugging and troubleshooting tips. Please open issues for bugs and feature requests.
1921

2022
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2123
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
2224

23-
## Table of Contents
24-
2525
- [Prerequisites](#prerequisites)
2626
- [Features](#features)
2727
- [Optional support](#optional-support)
2828
- [Installation](#installation)
29-
- [Usage](#usage)
29+
- [Rails v6](#rails-v6)
30+
- [Rails v7](#rails-v7)
31+
- [Manual Installation Steps](#manual-installation-steps)
32+
- [Usage](#usage)
33+
- [Defer for `javascript_pack_tag`](#defer-for-javascript_pack_tag)
3034
- [Server-Side Rendering (SSR)](#server-side-rendering-ssr)
3135
- [Development](#development)
3236
- [Webpack Configuration](#webpack-configuration)
33-
- [Babel Configuration](#babel-configuration)
37+
- [Babel configuration](#babel-configuration)
3438
- [Integrations](#integrations)
3539
- [React](#react)
40+
- [Typescript](#typescript)
3641
- [CoffeeScript](#coffeescript)
3742
- [TypeScript](#typescript)
3843
- [CSS](#css)
@@ -80,19 +85,21 @@ Pleaes see the [new rails/webpacker discussion forum](https://discuss.rubyonrail
8085

8186
## Installation
8287

83-
You can configure a new Rails application with Webpacker right from the start using the `-j webpack` option:
84-
85-
With Rails v7:
88+
### Rails v6
89+
With Rails v6, webpacker is installed by default:
8690
```bash
87-
rails new myapp -j webpack
91+
rails new myapp
8892
```
8993

90-
With Rails v6:
94+
### Rails v7
95+
96+
With Rails v7, skip JavaScript for a new app and follow below Manual Installation Steps to manually add the `webpacker` gem to your Gemfile.
9197
```bash
92-
rails new myapp
98+
rails new myapp --skip-javascript
9399
```
94100

95-
Or you can add it later by changing your `Gemfile`:
101+
### Manual Installation Steps
102+
Update your `Gemfile`:
96103

97104
```ruby
98105
# Gemfile
@@ -113,10 +120,10 @@ Then running the following to install Webpacker:
113120
When `package.json` and/or `yarn.lock` changes, such as when pulling down changes to your local environment in a team settings, be sure to keep your NPM packages up-to-date:
114121

115122
```bash
116-
yarn install
123+
yarn
117124
```
118125

119-
### Usage
126+
## Usage
120127

121128
Once installed, you can start writing modern ES6-flavored JavaScript apps right away:
122129

0 commit comments

Comments
 (0)