Skip to content

Minimized es-module-shims + @hotwired/stimulus-loading in Safari #74

@tomasc

Description

@tomasc

Upgrading to importmap-rails v0.9.0 results in issues with eager- or lazyLoad of Stimulus controllers (using @hotwired/stimulus-loading).

= javascript_importmap_tags

JS console:

Failed to autoload controller: modulor--view-components--grid--component
Error: Unable to resolve specifier 'controllers/modulor/view_components/grid/component_controller' from http://127.0.0.1:3010/assets/stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js
throwUnresolved — es-module-shims.min.source.js:2
(anonymous function) — es-module-shims.min.source.js:2
asyncFunctionResume
(anonymous function)
promiseReactionJobWithoutPromise

I was able to find out that switching to non-minified version of es-module-shims resolves the issue

= javascript_importmap_tags shim: false
= javascript_importmap_shim_tag minimized: false

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