Skip to content

Script for slimming down the Firebase `@exp`packaging

Notifications You must be signed in to change notification settings

akauppi/firebase-slim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

firebase-slim

A script to show how the Firebase "alpha" packaging can be slimmed down, without affecting features.

The script does not make changes to your local files. It provides you the commands you need to execute yourself.

In this code, only ES modules based browser targets are left (node.js, Cordova, CommonJS removed). You can tune this by commenting out sections in the script, if you wish. The author was only interested in targeting the latest browsers (native ESM support).

Potential for size reduction:

before after
firebase 18M 216K (-98.8%)
@firebase 47M 23M
with dependencies 80M 55M

Why do this?

I recently noticed that the node_modules/@firebase files were 128 MB in size.That number may have been a mistake, in retrospect This script removes pieces of them, one by one, as long as my web app continues to function.

Using it

NOTE: Be prepared to restore your Firebase package, if too much gets removed.

Within one's app repo, run the script:

$ <path to>/firebase-slim.sh

Execute the listed commands - at your own risk!! - to slim.

Try, whether your app still builds and works.

About

Script for slimming down the Firebase `@exp`packaging

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages