I'm using Rails5 app and deployed it to EB container successfully.
But webpacked assets -- served in public/packs
directly, return 404 in production environment.
In current situation, I set RAILS_SKIP_ASSET_COMPILATION = false
so I precompile assets before deploying the app everytime.
I used to use heroku as a production environment and everything went ok at that time.
here is my config/webpacker.yml
:
source_path: app/frontend/javascripts
source_entry_path: packs
public_output_path: packs # public/packs/filename-[hash].js
cache_path: tmp/cache/webpacker
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
extensions:
- .js
- .sass
- .scss
- .css
- .png
- .svg
- .gif
- .jpeg
- .jpg
what I tried...
I tried to change public_output_path from packs to assets. but same error persists...