Skip to content

404 on assets/stimulus-loading.js with config.assets.digest set to false #108

Open
@mrkcor

Description

@mrkcor

When turning the asset digests off (https://guides.rubyonrails.org/asset_pipeline.html#turning-digests-off) in the development environment by setting config.assets.digest to false in config/environments/development.rb the file assets/stimulus-loading.js will not load and you will get an HTTP 404 for that file:

image

Changing config/importmap.rb to pin to stimulus-loading instead of stimulus-loading.js will make it work in the environments where the asset digests are turned off, the file will then however not be included in the production assets when precompiling them.

I have created a new Rails app where you can reproduce this issue here: https://github.com/mrkcor/stimulus-loading-issue

For anyone looking for a workaround for this issue: you can put a copy of the file stimulus-loading.js in vendor/javascript and pin the file as is indicated in the README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions