Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There must be a way to specify multiple pack entry directories #1627

Closed
ryanscottaudio opened this issue Jul 26, 2018 · 7 comments
Closed

There must be a way to specify multiple pack entry directories #1627

ryanscottaudio opened this issue Jul 26, 2018 · 7 comments

Comments

@ryanscottaudio
Copy link

I'm migrating an old codebase to use webpacker. We have the option to run JS tests when running locally, which means that we need to bundle the test files into separate entry points along with everything else. We DON'T want to bundle those files for staging/production, however. I would think that the solution to this would just be to specify two separate pack entry directories in development/test and one in staging/production, but it seems like that's totally impossible in this structure, unless I'm missing something. If I'm not missing anything, and it IS impossible, then it seems weird to me that webpacker would restrict a functionality that webpack offers.

The only solution I can think of for this would be using symlinks to link my packs folders into a parent folder and marking THAT as the source_entry_path, but this would also involve prepending all my javascript_pack_tag calls with this new directory, which seems nuts to me.

@ryanscottaudio
Copy link
Author

ryanscottaudio commented Jul 26, 2018

I see in #585 (comment) that you addressed this a bit, saying that "ideally for developer experience it would be nice to have all entries at one place, which is how you would like to have in the longer term". I disagree that this is true in all cases, and I think it would be extremely useful to have multiple entry points as an option so that the decision to have one entry point or many could be delegated to each engineer/team in each unique situation, rather than enforced in the name of "best practices".

@tgsoverly
Copy link

I have a use case with multiple engines that the idea of having the code in the respective engine would be much better from a developer perspective than navigating up to the highest level and then back down.

@maryammouse
Copy link

I completely agree, and am running into this issue right now. We have a monolith rails app that uses engines for different parts of the app, and I would really like not to have move files up from the engine into the main app...

@gauravtiwari
Copy link
Member

Going to review this PR: #1694 and merge hopefully for engines support.

@tgsoverly
Copy link

It also feels like this is related too #348

@maryammouse
Copy link

Great to hear this is being worked on! :)

@guillaumebriday
Copy link
Member

Is this issue still relevant? Feel free to reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants