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

Replace problematic favicons-webpack-plugin dependency #30

Closed
amcclain opened this issue Mar 30, 2021 · 1 comment
Closed

Replace problematic favicons-webpack-plugin dependency #30

amcclain opened this issue Mar 30, 2021 · 1 comment
Assignees

Comments

@amcclain
Copy link
Member

We use favicons-webpack-plugin to conveniently process a single app-specific favicon image into a variety of supported sizes and then install the appropriate browser tags within each app's generated HTML to specify favicons/shortcut images.

Unfortunately, this particular dependency brings along a post-install build step using sharp and other unexpected dependencies which download their own dependencies from the internet (github.com and nodejs.org). This post-install script is distinct from the core yarn/npm fetch, and so isn't as easily pointed to an internal artifact repository when running builds in a secure environment with limited internet access.

This network access is the real blocker, but these libs have caused us other issues in the past. Previously we had another dep for compiling SASS with similar post-install behaviors, but an earlier upgrade to dart-sass in v5.1.0 has removed this set of issues for that more important core library.

To workaround, we've published an alternate 5.6.0-nofavicons release off of a branch that clients who require it can use immediately.

Ideally we would resolve this in the mainline branch. Some possibilities include:

  • Research this dependency, includings its latest webpack v5 version, and determine if this post-install behavior and these downloads can be customized, re-routed (might be possible, not assuming anything).
  • Find an alternate library that does not require the problematic transitive deps/scripts but has the same overall functionality (doubtful).
  • Provide a way for the developer to process their own favicons (at least one primary .ico file) and still get tags injected into the generated HTML.
  • Unbundle the current dep but modify or wrap configureWebpack to use it if available, for apps/environments that can take advantage of it and don't mind the scripted downloads.
@amcclain amcclain changed the title Replace or workaround problematic favicons-webpack-plugin dependency Replace problematic favicons-webpack-plugin dependency Mar 30, 2021
@amcclain
Copy link
Member Author

amcclain commented Feb 9, 2022

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