3.0 has updated the default export to be an object for future upgrades / maintainability. Anywhere you were previously using a singular import you'll need to update to destructure or pull from the object instead. Example below:
Old:
const fontawesomeSubset = require('fontawesome-subset');
New:
const { fontawesomeSubset } = require("fontawesome-subset");
New (TypeScript / Module Syntax):
import { fontawesomeSubset } from "fontawesome-subset";
Version 2.0 of fontawesome-subset removes the required dependency for @fortawesome/fontawesome-free
.
For Pro users, this release should be backwards compatible since we're only removing the required dependency for the free version.
For Free users, this means you'll have to manually specify / save the dependency, as noted in the updated readme.
npm install --save-dev @fortawesome/fontawesome-free