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

Is it possible to build it with webpack? #271

Closed vkhv closed 8 years ago

vkhv commented 8 years ago

I couldn't build it with webpack, because node-module fs broke build.

$ webpack index.js bundl.js
ERROR in ./~/bem-xjst/index.js
Module not found: Error: Cannot resolve module 'fs' in C:\Users\khvostov\test\cc-exp\node_modules\bem-xjst
 @ ./~/bem-xjst/index.js 1:9-22

Is it possible to use it on client-side, without enb?

qfox commented 8 years ago

require('bem-xjst').generate("block('a').tag()('a');") will make a ready for use bundle for you.

Look also at https://github.com/gulp-bem/gulp-bem-xjst — "without enb" (as requested).

vkhv commented 8 years ago

Thanks for answer!

qfox commented 8 years ago

@vladkhvo Btw, take a look at https://github.com/bempack/bemhtml-loader /cc @sullenor