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

Allow to set a custom output file for the assets #146

Open
robclancy opened this issue May 15, 2020 · 2 comments
Open

Allow to set a custom output file for the assets #146

robclancy opened this issue May 15, 2020 · 2 comments

Comments

@robclancy
Copy link
Contributor

Font awesome is more than half our vendor right now and retroactively going over every icon used (lots in dynamic ways) to allow them in the build config would take a long time and be error prone (although we will have to do it oneday).
This means any dependency change for deployment causes us to download all of font awesome because it will no longer be cached. Our short term solution to this is to use a separate vendor js so that it will stay in the cache far longer, and even if we want we can disable fingerprints on it.

So my request is to allow to set the outputFile option in app.import, which we have hardcoded here. master...postedin:output-file

I can make a PR with it as an option isntead of hardcoding. In dev it all works just with a separate file loading in.

@jrjohnson
Copy link
Collaborator

Thanks @robclancy, I took a quick look, this seems like a very cool approach for dealing with caching the more static icon files.

I think I'd like to see this to be opt-in initially as I'm not sure if it would be breaking in some specific cases (Fastboot, yarn workspace, nested addons) it usually takes a while for those bugs to show up so opt-in gives more time to test for them in the wild.

I haven't ever seen that argument to app.import used - it's probably fine, but maybe do this work in treeForPublic instead?

@robclancy
Copy link
Contributor Author

robclancy commented May 15, 2020 via email

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

2 participants