-
Supposed I have the following: gem1:
gem2:
Is it possible to load the gem1.js and gem2.js entrypoints from main app? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 18 replies
-
Technically, you can always import If you are talking about Rails engines, take a look at this example setup with separate compilation, or this example where the assets can be referenced directly using aliases. Could you describe the use case you have in mind? Normally you would package assets in an |
Beta Was this translation helpful? Give feedback.
Technically, you can always import
gem1.js
from an entrypoint in your application, by using an absolute path that resolves to the gem location in disk (or an alias).If you are talking about Rails engines, take a look at this example setup with separate compilation, or this example where the assets can be referenced directly using aliases.
Could you describe the use case you have in mind? Normally you would package assets in an
npm
package instead of a gem, in which case you can import from the package as usual.