leshill / handlebars_assets

Use handlebars.js templates with the Rails asset pipeline.
MIT License
649 stars 159 forks source link

help with building vendored files from source #161

Closed pravi closed 5 years ago

pravi commented 6 years ago

I'm packaging handlebars_assets in debian (it is a dependency of diaspora). Currently we are shipping the vendored files as is and hence it cannot be in main section of debian (it is in contrib). We'd like to build these files from their source, but when using such files, I get this error

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837466#17

May be I'm doing something wrong with the build, can you share your build script? handlebars.js gruntfile seems to generate only commonjs modules, so I used this command to generate the umd modules.

pravi commented 6 years ago

I think the incompatibility is created by using webpack 3.5.6 in debian. Once they move to webpack 3 https://github.com/wycats/handlebars.js/pull/1402 and handlebars_assets is updated to that version, we will have compatible libraries.

pravi commented 5 years ago

With this patch -> https://salsa.debian.org/js-team/node-handlebars/blob/master/debian/patches/port-to-babel6-webpack3.patch we are able to build handlebras using webpack 4 and babel 6.