All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Upgraded all dependencies
- Updated year in copyright notice
- You can now pass selector strings or
<link>
elements directly, rather than wrapping it in a config object. - When using an Array to specify multiple icons to target, the different options (selector,
HTMLLinkElement
, config object) can be mixed-and-matched - In addition to Arrays,
favicon-mode-switcher
now also supportsNodeList
so you can use it withdocument.querySelectorAll()
- Update tests and docs to match new options
- Rewritten main function to get bundle size to ~350B 🎉
- Fix entry points in
package.json
- Improved terser settings to get minzipped size <600B
- IconConfig can now take an HTMLLinkElement directly, rather than passing a selector string. Passing selectors is still supported.
- BREAKING: IconConfig['selector'] is now called IconConfig['element']
- Tests added 🏗
- Documentation / README added
- Module should now export correct typings
- Correctly compile minified UMD build instead of overwriting it with CJS
- Changed build options:
index.js
is now CommonJS and exports the default export directly, UMD available asindex.umd.js
, there.default
is necessary to access the export
- Correctly abort if no options are passed
- TypeScript types (experimental)
- Better build setup with Linting
- Tests to ensure the module runs in a Node environment (SSR)
- BREAKING: UMD default export now directly on window as faviconModeSwitcher
- Only show warning if specified selector didn't match an HTMLLinkElement
- Initial version added