A webpack plugin that downloads Google Fonts to your build folder using google-webfonts-helper or links to the Google Fonts CDN. Version 0.4.4 is the latest stable release; activity is sporadic with no recent updates. Key differentiators: seamless integration with webpack and html-webpack-plugin, support for multiple font formats (eot, woff, woff2, ttf, svg), and optional local hosting versus CDN linking.
npm install google-fonts-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic configuration: specifying font families with variants, setting local download with woff2/woff formats, and custom output path and CSS filename.
Migrate to a maintained alternative like @next/font (Next.js) or fontsource packages.
Set local: true in the options object if you want fonts bundled locally.
Install html-webpack-plugin or set local: true to avoid dependency on it.
If the API is down, consider using a self-hosted instance or switch to local: false and use CDN.
Verify variant strings against the Google Fonts API or google-webfonts-helper.
Run 'npm install google-webfonts-helper' as a dependency.
Use 'const GoogleFontsPlugin = require('google-fonts-webpack-plugin');'Ensure the plugin is instantiated with an options object containing a 'fonts' array.
Either set local: true or install and configure html-webpack-plugin.