Permalink
Browse files

Require Rails JS libs in the application pack

  • Loading branch information...
calleerlandsson committed Feb 1, 2019
1 parent da93aeb commit d8949d789f208925c5f5616f2e8abf79d3bc49a5
Showing with 29 additions and 5 deletions.
  1. +0 −3 app/assets/javascripts/application.js
  2. +3 −1 app/javascript/packs/application.js
  3. +4 −1 package.json
  4. +22 −0 yarn.lock
@@ -10,8 +10,5 @@
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require rails-ujs
//= require activestorage
//= require turbolinks
//= require jquery
//= require_tree .
@@ -7,4 +7,6 @@
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb

console.log('Hello World from Webpacker')
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
@@ -2,7 +2,10 @@
"name": "webpacker-rails-5-2",
"private": true,
"dependencies": {
"@rails/webpacker": "3.5"
"@rails/activestorage": "^6.0.0-alpha",
"@rails/ujs": "^6.0.0-alpha",
"@rails/webpacker": "3.5",
"turbolinks": "^5.2.0"
},
"devDependencies": {
"webpack-dev-server": "2.11.2"

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit d8949d7

Please sign in to comment.