Adjust application pack in webpacker guide
This is how it looks like when generated in the new app (via Rails 6.1.3) [ci skip]
This commit is contained in:
parent
b90875ebd9
commit
6d0773a468
|
@ -98,10 +98,14 @@ So if you have a file called `app/javascript/packs/application.js`, Webpacker wi
|
|||
The default pack created for you by Webpacker will link to Rails default JavaScript packages if they have been included in the project:
|
||||
|
||||
```
|
||||
require("@rails/ujs").start()
|
||||
require("turbolinks").start()
|
||||
require("@rails/activestorage").start()
|
||||
require("channels")
|
||||
import Rails from "@rails/ujs"
|
||||
import Turbolinks from "turbolinks"
|
||||
import * as ActiveStorage from "@rails/activestorage"
|
||||
import "channels"
|
||||
|
||||
Rails.start()
|
||||
Turbolinks.start()
|
||||
ActiveStorage.start()
|
||||
```
|
||||
|
||||
You'll need to include a pack that requires these packages to use them in your Rails application.
|
||||
|
|
Loading…
Reference in New Issue