Import only auth and firestore from firebase

Import only auth and firestore from firebase

I am attempting to reduce the firebase library size in my vuejs app. I currently import firebase as
import * as firebase from 'firebase';
require("firebase/firestore");

Inside my vendor file I have the database and messaging services but I have no use for them. 
How do I go about only importing auth and firestore into firebase object? 

Solutions/Answers:

Solution 1:

First you need to import the core

import * as firebase from 'firebase/app';

then import required modules

import 'firebase/auth';
import 'firebase/firestore';

or

var firebase = require("firebase/app");
require("firebase/auth");
require("firebase/database");

References

Related:  Cloud functions for firebase finished with status: 'timeout'