Comments (5)
@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.
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.
@risinglf https://gist.github.com/varyform/92be68c3ea2d94d31de3c3359284c0e5
from importmap-rails.
@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.
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)
- Import_maps going to wrong directory
- Importmap:install loads rakefile twice
- asset_path('es-module-shims.min') does not work in production HOT 1
- files ending in `_index.js` have `index` replaced with an empty string HOT 3
- Why do certain pins disappear in production? HOT 2
- Unpin command causing net error HOT 3
- Confusing message on 'update'
- Unable to unpin HOT 1
- Persistent 404 error when pinning HOT 11
- Package works when pinned from JSPM but not when downloaded HOT 2
- Break in iOS 16.2 when upgrading from 1.2.3 to 2.0.1 HOT 4
- turbo:load event not fired anymore in test environment after upgrade from 1.2.3 to 2.0.1 HOT 3
- Feature suggestion: optional `process.env` polyfill
- Multiple importmaps HOT 6
- Importmap update removes pins via http HOT 1
- importmap pin/update removes preload: false
- ga.jspm.io never updates HOT 3
- ./bin/importmap outdated command fails with undefined method `dig' for an instance of String HOT 6
- Add option to `bin/importmap pin URL` to create direct/remote link without downloading
- Option to 're-sync' vendor folder HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from importmap-rails.