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

817 questions
0
votes
0 answers

Rails+webpacker on safari / SyntaxError: Unexpected keyword 'const'

Currently using a default rails app install with webpacker and react, I'm stuck with the following error SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode I might be possible to extend this easily I…
Ben
  • 5,030
  • 6
  • 53
  • 94
0
votes
2 answers

Foreman start not working right on rails app

I'm trying to run foreman start on my app. but it gives me an error saying 12:53:39 web.1 | started with pid 7647 12:53:39 rails.1 | started with pid 7648 12:53:39 webpack.1 | started with pid 7649 12:53:39 web.1 | …
Hirohito Yamada
  • 387
  • 1
  • 4
  • 17
0
votes
1 answer

rails webpacker react MissingEntryError

I'm trying to setup my new project with Rails 5.1 and Wepacker-react, but I get first error very quickly. I have been created new component in javascript/packs The code is basic: javascript/packs/home.jsx import React from 'react' import ReactDOM…
0
votes
1 answer

How to deploy a Rails + Webpacker app to Heroku?

I'm trying to deploy a Rails 5 application to Heroku. It's the first time, however, that I added webpack to the equation. I've used webpack to add some Vue components when needed. In my local environment everything works very well, however, things…
ilrock
  • 573
  • 8
  • 24
0
votes
2 answers

Storing nested objects in React State

I'm getting a json from an endpoint which looks like this: {"section":{"name":"name","subsections":[ {"name":"one","snippets":[{"title":"title","body":"body"}]}, {"name":"two","snippets":[{"title":"title","body":"body"}]}] }} This is how I get…
dhaliman
  • 1,542
  • 1
  • 12
  • 23
0
votes
1 answer

Wercker CI config for rails 5.1 + reactjs with webpacker gem

I struggle setting up Wercker on a rails / Webpacker project. I first had to add steps to install node, then another to pre-compile react packs, then to install yarn. First it was good but then I added dependencies to the project and know I'm stuck…
adesurirey
  • 2,549
  • 2
  • 16
  • 36
0
votes
0 answers

Server Side Rendering with React_on_Rails v9: React Router v4 issue

React_on_rails v9 makes passing props from server side a breeze, therefore making server side rendering so simple when prerender is set to true. But the challange one faces is when trying to implements React Router v4. The isssue with react router…
0
votes
2 answers

How to test a Webpack bundle that has external dependencies?

I'm new to Webpacker and Rails in general. I recently moved to using Webpacker to bundle React components. Since part of the application still uses the asset pipeline, some dependencies are still stored in vendor/assets/javascript, and accessible as…
0
votes
0 answers

Rails 5: Webpacker can't resolve 'vuelidate' and 'vuelidate/lib/validators' in prod

I am trying to use Vuelidate in production with Webpacker for my Rails app. Usually I just need to run the following commands for my packages.json to get built and deployed into my app: RAILS_ENV=production bundle exec rake…
DaniG2k
  • 4,772
  • 36
  • 77
0
votes
1 answer

How to view production output of Webpacker?

Following the docs when I attempt to run the given command nothing is built. $ NODE_ENV=production bundle exec rails webpacker:compile Webpacker is installed Using /home/james/Documents/comity.fit/config/webpacker.yml file for setting up webpack…
James L.
  • 12,893
  • 4
  • 49
  • 60
0
votes
0 answers

How to read environment in Vue.js app on Rails via webpacker

I would like to do something similar like Rails.env.test? but withing Vue.js app which is setup via Rails & Webpacker. How to do it?
knagode
  • 5,816
  • 5
  • 49
  • 65
0
votes
3 answers

Can't see reason for Compiling… Compilation failed: (Executor::NonZeroExitStatus)

Deploying on beanstalk. Using rails with webpacker. Compiling… Compilation failed: (Executor::NonZeroExitStatus) We can't seem to get anymore info as to what caused the compilation fail. How can we get more info? Is there a debug mode for…
monty_lennie
  • 2,871
  • 2
  • 29
  • 49
0
votes
0 answers

Can't install a npm module with webpacker-react

I would like to install react-dropzone in my project. I use react-rails project. I had installed webpacker-react to use gem. I installed react-dropzone via npm install, but i can't load it in my react components. (I suppose it's due to…
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
  • 16,287
  • 16
  • 59
  • 90
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…
1 2 3
54
55