-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[POC] Eject feature #1916
[POC] Eject feature #1916
Conversation
You beat me to it 😆, I had been working out an Looks good! |
Very interesting work. FYI, I made WebpackManifest gem a while ago, which provides helpers to resolve path and chunk. |
Anyone knows if this PR will get merged? |
@banyan Updating lines 2, 10, 12, 14, and 33 of |
Does this have support broadly from the rest of the rails team? Seems like an excellent idea and I would even say that if webpacker was just reconstructed into a set of generators it may be even better. We have to learn parts of webpack anyway and in order to know why our CSS is showing up inline instead of a file in dev you have to dive into webpacker to determine the config anyway. |
@banyan has extracted this PR as webpacker_ejetor gem 🎉 |
Hi! I want to pursue a possibility that if we can have eject feature in webpacker.
I understand webpacker can configure all of webpack settings using
ConfigList
andConfigObject
. If a use case is just simple, then we can go with webpacker without having many custom settings, but if we want to customize, eventually we have to understand internal webpacker codes. In that case, I thinkwebpacker:eject
would be useful especially who knows webpack well and wants to configure directly.I believe
webpacker:eject
would be an escape route of a tall mountain. Even it might not be used, it will make people feel easy and it will strengthen webpacker. That being said, this PR is just POC and has a problem how to maintain the initialwebpack.config.js
. IMO,webpack.config.js
is not need to be completely compatible with webpacker's one, but just core logic is enough.eject will do following things:
webpack.config.js
while referring toconfig/webpacker.yml
's settings.config/webpack/loaders/*
will be used from generatedwebpack.config.js
. so for example, if you runbundle exec rake webpacker:install:elm
before, you can still useelm
.javascript_pack_tag
.yarn start
andyarn build
will be added.This PR works well with fresh
rails new
projects.I'm happy if I can get any feedbacks.
@gauravtiwari I saw this. do you have any idea regarding implementation?