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

bem-xjst 7.7.6-7.7.7. Увеличен размер бандла bemtree и bemhtml на клиенте #527

Open belozer opened 6 years ago

belozer commented 6 years ago

До 7.7.6 lib/bemtree/index.js подключал lib/bemxjst и наследовался от него. Начиная с 7.7.6 эти модули конкатятся в bemtree/bundle.js и bemhtml/bundle.js

browserify

На версии 7.7.4 упаковка весит 9Kb GZ

const engines = {
    bemtree : require('bem-xjst/lib/bemtree/'),
    bemhtml : require('bem-xjst/lib/bemhtml/'),
};

С версии 7.7.6 приходится так упаковывать (т.к. index.js обрезан)

const engines = {
    bemtree : require('bem-xjst/lib/bemtree/bundle'),
    bemhtml : require('bem-xjst/lib/bemhtml/bundle'),
};

и общий вес в GZ теперь 14Kb.

Разница в 5kb связана с дублированием кода в bundle.