Open chechenev opened 9 years ago
Also I trying to use r.js (for minimize to one file) with almond, but I have error " hbs is not defined":
Tracing dependencies for: ../../../node_modules/almond/almond
ReferenceError: hbs is not defined
In module tree:
main
app/views/app
app/views/filter
hbs
Error: ReferenceError: hbs is not defined
In module tree:
main
app/views/app
app/views/filter
hbs
at eval (eval at <anonymous> (C:\Users\chechenev_m\WebstormProjects\tass web
\client-side\r.js:28066:64), <anonymous>:1:1)
My build file:
({
baseUrl: 'js/',
mainConfigFile: 'js/main.js',
out: 'dist/output.min.js',
optimize: 'uglify2',
include: ['main'],
name: '../../../node_modules/almond/almond',
})
I use this plugin with Backbone, materialize and sometimes (about once every ten loads) "Handlebars" and "JSON" in hbs.js are undefined, so I have some errors like "Cannot read property 'stringify' of undefined" or if Handlebars is undefined "Cannot read property 'registerHelper' of undefined". My requirejs config: