Skip to content

Updating from 1.1.3 to 1.1.4 no longer executes any stimulus code (Rails 7) #142

@agrieser

Description

@agrieser

Rails 7 + Turbo + Stimulus

Using importmap-rails 1.1.3, everything works as expected
Updating to importmap-rails 1.1.4, no stimulus code is executed
Reverting to importmap-rails 1.1.3, everything works as expected

There's really nothing special about this app. Rails 7, using out of the box configuration for Turbo and Stimulus.

In app/javascript/controllers/application.js I added a log line to see if the browser was executing the file at all:

import { Application } from "@hotwired/stimulus"

const application = Application.start()

// Configure Stimulus development experience
application.debug = false
window.Stimulus   = application

console.log("executing js");
export { application }

Using importmap-rails 1.1.3, I see the log line displayed in chrome's console
Using importmap-rails 1.1.4, the log line is not displayed in chrome's console
Reverting to importmap-rails 1.1.3, the log line is again displayed in chrome's console.

There are no additional errors displayed in either the build process (using rails bin/dev) or in chrome.

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