skypackjs / skypack-cdn

An issue tracker for the CDN
107 stars 5 forks source link

Side effect imports are removed #139

Open dmotz opened 3 years ago

dmotz commented 3 years ago

A common pattern in packages that use Firebase is to import the base module and then additional modules that run side effects internally to augment the base, like this:

import firebase from 'firebase/app'
import 'firebase/auth'
import 'firebase/database'
import 'firebase/firestore'

When the package is deployed to Skypack, the additional import lines are removed completely and the package breaks.

FredKSchott commented 3 years ago

Thanks for filing, I had just noticed this as well. Originally it was done to reduce bytes /w tree-shaking, but it seems to break some packages that rely on them. We have a PR out to drop this so that all imports are preserved.