I just updated require-handlebars to commit d008b94087290e3b2fd8d9d and it works fine when using client-side require. But when I try to optimize using r.js with the following config:
({
// scripts dir that needs to be optimized
baseUrl: "../scripts"
// location of scripts dir to be copied after optimization
, dir: "../bin/scripts"
//JS file configuration to be read for the build
, mainConfigFile: '../scripts/require_config.js'
, modules: [
{
name: 'main'
}
, {
name: 'mainEnrollment'
}
, {
name: 'advisorModule'
, exclude:[
'jquery'
, 'underscore'
, 'backbone'
, 'services'
, 'hbs'
]
}
, {
name: 'mainPFA'
}
]
// remove files that have been combined during optimization
, removeCombined: true
, optimizeCss: 'none'
, waitSeconds: 30
//to exclude the compiler code during the save phase.
, pragmasOnSave : {
//removes Handlebars.Parser code (used to compile template strings) set
//it to false if you need to parse template strings even after build
excludeHbsParser: true
// kills the entire plugin set once it's built.
, excludeHbs: true
//remove the i18n compile, underscore and json2
, excludeAfterBuild: true
}
})
I get the following error:
Tracing dependencies for: main
Tracing dependencies for: mainEnrollment
Error: ENOENT, no such file or directory '../bin/scripts/templates/emailForm.html'
In module tree:
mainEnrollment
routers/routerEnrollment
views/modules/enrollment
views/modal-windows/emailFormEnrollment
hbs
Error: ENOENT, no such file or directory '../bin/scripts/templates/emailForm.html'
In module tree:
mainEnrollment
routers/routerEnrollment
views/modules/enrollment
views/modal-windows/emailFormEnrollment
hbs
I just updated require-handlebars to commit d008b94087290e3b2fd8d9d and it works fine when using client-side require. But when I try to optimize using r.js with the following config:
({ // scripts dir that needs to be optimized baseUrl: "../scripts" // location of scripts dir to be copied after optimization , dir: "../bin/scripts" //JS file configuration to be read for the build , mainConfigFile: '../scripts/require_config.js' , modules: [ { name: 'main' } , { name: 'mainEnrollment' } , { name: 'advisorModule' , exclude:[ 'jquery' , 'underscore' , 'backbone' , 'services' , 'hbs' ] } , { name: 'mainPFA' } ] // remove files that have been combined during optimization , removeCombined: true , optimizeCss: 'none' , waitSeconds: 30 //to exclude the compiler code during the save phase. , pragmasOnSave : { //removes Handlebars.Parser code (used to compile template strings) set //it to
false
if you need to parse template strings even after build excludeHbsParser: true // kills the entire plugin set once it's built. , excludeHbs: true //remove the i18n compile, underscore and json2 , excludeAfterBuild: true } })I get the following error:
Tracing dependencies for: main
Tracing dependencies for: mainEnrollment Error: ENOENT, no such file or directory '../bin/scripts/templates/emailForm.html' In module tree: mainEnrollment routers/routerEnrollment views/modules/enrollment views/modal-windows/emailFormEnrollment hbs
Error: ENOENT, no such file or directory '../bin/scripts/templates/emailForm.html' In module tree: mainEnrollment routers/routerEnrollment views/modules/enrollment views/modal-windows/emailFormEnrollment hbs
If I only compile one module it works fine.