Refactored as PackerJS module