Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import "regenerator-runtime/runtime";
Don't forget to install those dependencies directly!

```sh
yarn add --save core-js regenerator-runtime
yarn add core-js regenerator-runtime
```

## [4.0.2] - 2019-03-06
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ gem 'webpacker', '~> 4.x'
# OR if you prefer to use master
gem 'webpacker', git: 'https://github.com/rails/webpacker.git'
yarn add https://github.com/rails/webpacker.git
yarn add core-js regenerator-runtime
```

Finally, run the following to install Webpacker:
Expand Down Expand Up @@ -123,6 +124,13 @@ app/javascript:
└── logo.svg
```

In `/packs/application.js`, include this at the top of the file:

```js
import "core-js/stable";
import "regenerator-runtime/runtime";
```

You can then link the JavaScript pack in Rails views using the `javascript_pack_tag` helper.
If you have styles imported in your pack file, you can link them by using `stylesheet_pack_tag`:

Expand Down