-
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
Always check files recompilation by content #1743
Always check files recompilation by content #1743
Conversation
Thanks @mdesantis 🍰 I am wondering if it would make sense to use |
@gauravtiwari I thought about that too but I'm worried about CI: it's unlikely that you run tests under production environment. What about doing Also, an alternative fix could be just documenting the CI env var in the readme (and maybe renaming that; I don't think it's descriptive enough); developers might just be confused by the fact that this behaviour isn't written loud and clear |
As someone who is not super familiar with webpacker internals, forgive me if this is a dumb question. Is this codepath even used in development? My impression is that this feature is for when assets are precompiled, which doesn't happen in development mode. |
@latortuga (not a Webpacker expert neither) but you can precompile assets even in development if for some reason you don't want to use |
Please see @gauravtiwari's comment here for an example of what he means. Production & Test (or any env other than Development) would use the file hash method. |
Is there a reason why the results of |
@jpickwell I raised this with my earlier PR and got the 👍 but didn't get around to implementing it. |
Thanks everyone 🙏 Lets use Why in development? Mainly because, Webpacker ships with this "naive" on-demand compiler, which works well for simple cases and we don't want to slow it down, even if it's tiny by using file hash. If I am not missing anything, I think But as I wrote the above paragraph, I realised for simple cases using file hash wouldn't be slow either. So, perhaps just use file hash for everything to keep things simple? |
Thanks @mdesantis :) |
If you have sometime, could you also port this to |
Any chance this will be put into 3.x? This fix would really help our deployment process out. Deployment went from 3-4 minutes to ~15 minutes for us. It's a big pain. |
Fix #1439