Skip to content

Browser Save Page As doesn't export importmap js #289

@sbounmy

Description

@sbounmy

Hey there, I've been stuck with these for weeks.

I have an app that user should be able to "Save Page As" for offline mode.

However when I export, the assets defined in importmap.rb are not exported (tried on Safari and Chrome) so my page is broken.

I think browser need to have a javascript_include_tag to be able to export.

What would be the best approach to solve this ? Knowing that I would like to keep importmap working for online mode.
I tried to :

  • tweak eshim but didnt work
  • use jsbundling to compile the js files but didnt work well with existing importmap
  • having a custom javascript_importmap_tags that would loop through Rails.application.importmap but import statement didnt work

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