bem / bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
https://bem.github.io/bem-xjst
Other
116 stars 48 forks source link

Tree Shaking for templates (like CSSO for bem-xjst) #531

Open belozer opened 6 years ago

belozer commented 6 years ago

bundle before

// lib
block('my-block').content()(() => 'base');

// common.blocks
block('my-block').content()(() => 'project-base');

// phone.blocks
block('my-block').content()(() => 'phone-base');

bundle after clean

// phone.blocks
block('my-block').content()(() => 'phone-base');

@miripiruni how realistic is that?