Questions tagged [webpacker]

Webpacker is a Ruby gem for Ruby on Rails that makes it easy to use Webpack, the JavaScript module bundler, to manage application-like JavaScript in Rails. It coexists with the asset pipeline and can even replace it by processing CSS, images, fonts, and more.

Features

License

MIT

Links

GitHub

RubyGems

728 questions
0
votes
1 answer

Rails - React components doesn't get mounted on second page load

I'm using Rails with webpacker with react. I'm loading my components like this in my view file:
<%= javascript_pack_tag 'components/mycomponent' %> In mycomponent, I have: document.addEventListener('DOMContentLoaded',…
resting
  • 12,009
  • 15
  • 51
  • 77
0
votes
2 answers

Make webpack paths relative to current directory

The Question: I am using Rails 5.0 with Webpacker, and I am trying to setup our initial Webpack config. In Rails+Webpacker Webpack generates a different build file for each item in the app/javascript/packs folder. Is there a way to get these Webpack…
0
votes
1 answer

How to debug webpacker running twice?

Rails 5.1.1, ruby 2.4.1, webpacker 2.0, when running system tests through rake test:system. It will be helpful If there is way to see more debug logs, like which file load which modules, etc. Note that It is happen only when there is no cache, that…
YOU
  • 106,832
  • 29
  • 175
  • 207
0
votes
1 answer

What is a functional set-up for rails + webpacker development that solves CSRF issues?

I'm running Rails 5.0.2 on a project, looking to use react-rails and webpacker to handle things on the front end. I've only got a few components/pages that need to be dynamic, so I'm leveraging server-side rendering for a majority of the pages. I've…
fredugolon
  • 518
  • 3
  • 9
-1
votes
0 answers

Deploy on heroku asking to install webpack cli

I keep getting: CLI for webpack must be installed. webpack-cli (https://github.com/webpack/webpack-cli) We will use "yarn" to install the CLI via "yarn add -D webpack-cli". Do you want to install 'webpack-cli' (yes/no): when…
Gotey
  • 307
  • 3
  • 9
  • 28
-1
votes
1 answer

Rails Scaffolds not submitting form (form stuck on new) caused by ujs

My project's server-side scaffold forms will not redirect to the next page. (from new->show with flash message). Although the content from the form is saved and a new record saved. (not sure how?) When i comment out the lines, in application.js in…
marcsqna09
  • 27
  • 6
-1
votes
1 answer

I only get 500 status in Rails Production env

It seemed to work for a moment but then again only gives me 500 both on local and heroku. Maybe it is because I am using sass? Logs: Repo: https://github.com/adelmuursepp/adel_portfolio_site
Adel M.
  • 33
  • 2
-2
votes
1 answer

Import React library Ruby On Rails

Having knowledge of Ruby, I decided to start developing a web application with RoR.Since I didn't find a front-end framework for RoR, I decided to go for React. That's how I found the gem react-rails. However, I don't know how to import a React…
mamenejr
  • 205
  • 3
  • 15
1 2 3
48
49