GithubHelp home page GithubHelp logo

Comments (5)

maxhoffmann avatar maxhoffmann commented on September 15, 2024 2

@dhh I’d really appreciate to have more documentation about this in the readme. Especially about how to set up a separate importmap object manually. I tried javascript_importmap_tags "something", which changed import "application"; to import "something";, but it’s not listed in the import map like application.js and produces an error.

More documentation about how to configure Rails to have multiple JS entry points would be amazing. πŸ™

from importmap-rails.

dhh avatar dhh commented on September 15, 2024 1

You'll need to manually setup a separate importmap object: https://github.com/rails/importmap-rails/blob/main/lib/importmap/map.rb

Then pass it by hand to the helper: https://github.com/rails/importmap-rails/blob/main/app/helpers/importmap/importmap_tags_helper.rb#L14

from importmap-rails.

varyform avatar varyform commented on September 15, 2024 1

@risinglf https://gist.github.com/varyform/92be68c3ea2d94d31de3c3359284c0e5

from importmap-rails.

henrikbjorn avatar henrikbjorn commented on September 15, 2024 1

@dhh Can this be reopened, it would be a great feature to support out the box. Either in the default importmap with something like pin "asset", to: "my url", under: "activeadmin" where under: defaults to "application"

from importmap-rails.

risinglf avatar risinglf commented on September 15, 2024

Hi @dhh and @maxhoffmann I cannot understand how to use two separate .js file (one for the main public application and one for a private admin space).

How can we configure 2 separate importmap configurations?

Thanks a lot.

from importmap-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.