skypackjs / skypack-cdn

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

[Feature] Tree shake parameter #91

Open shadowtime2000 opened 3 years ago

shadowtime2000 commented 3 years ago

What about a tree-shake parameter in an import so that it only imports what is needed?

import { render, parse } from "https://cdn.skypack.dev/eta?tree-shake=render,parse";

And it would eliminate everything that is guaranteed to not live.

FredKSchott commented 3 years ago

+1, we've considered this before but were worried about making it less likely to get a cache hit. However, I think this feature is worth revisiting now.