Skip to content

Is it possible to load entrypoints in Gemfiles from main application? #159

Answered by ElMassimo
vtt asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 18 replies

Comment options

You must be logged in to vote
18 replies
@Matt-Yorkley
Comment options

@ElMassimo
Comment options

@Matt-Yorkley
Comment options

@ElMassimo
Comment options

@mameier
Comment options

Answer selected by vtt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants