You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't get the react components of application.js or hello_react.jsx to load when placing the pack_tag: <%= javascript_pack_tag 'hello_react' %> in my application.html.erb or index.html.erb
Running both ./bin/webpack-dev-server and rails s
Tried adding a index.html file in my public > packs directory but it loads as plain text. (Advice from issue #1325 ).
What am I missing? Not looking for hot reloading, just trying to get this to load a react component.
I also tried react-rails but even with importing <%= react_component("HelloWorld", { greeting: "Hello" }) %> from a generated component I'm getting the same issue on localhost:3035. I tried changing it to localhost:3000 in the webpack config but same result.
The text was updated successfully, but these errors were encountered:
Can't get the react components of
application.js
orhello_react.jsx
to load when placing thepack_tag
:<%= javascript_pack_tag 'hello_react' %>
in myapplication.html.erb
orindex.html.erb
Running both
./bin/webpack-dev-server
andrails s
Tried adding a
index.html
file in mypublic > packs
directory but it loads as plain text. (Advice from issue #1325 ).What am I missing? Not looking for hot reloading, just trying to get this to load a react component.
I also tried
react-rails
but even with importing<%= react_component("HelloWorld", { greeting: "Hello" }) %>
from a generated component I'm getting the same issue onlocalhost:3035
. I tried changing it tolocalhost:3000
in the webpack config but same result.The text was updated successfully, but these errors were encountered: