erikras / erikras/react-redux-universal-hot-example

correct way to handle path change between webpack and rails

Open
#1,264 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hey guys,
I am currently working with this project https://github.com/spark-solutions/spark-starter-kit
which is heavily inspired by your project. One issue I'm having is that I can't figure out how to correctly handle the issue between the rails path and the webpack path for assets.

For example in webpack dev server the path is loaded successfully like this:
http://localhost:3500/6b4fec0f21ce52aebc80204c2d5c4849.png

but when you try to load it up in production it no longer works because the rails path is:
http://localhost:3000/assets/6b4fec0f21ce52aebc80204c2d5c4849.png

but its still trying to load the path like this:
http://localhost:3000/6b4fec0f21ce52aebc80204c2d5c4849.png

which yields a 404.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.