SlexAxton / require-handlebars-plugin

A plugin for handlebars in require.js (both in dev and build)
804 stars 202 forks source link

plugin uses global require config in stead of loading context. #73

Open mwinkels opened 11 years ago

mwinkels commented 11 years ago

The hbs plugin uses the 'require' function without specifying it as a dependency. As a result the global require config is used in stead of the require config of the loading context.

FIX:

define([ 'require', 'handlebars', ... ], function ( require, Handlebars, ... ) { ...

By specifying 'require' as a dependency, teh correct context is passed.

SlexAxton commented 11 years ago

Sorry I was gone during this and just getting through email.

Can you do a pull request on this so it'll get you credit in the logs?

DimitarChristoff commented 11 years ago

doing this will break nodejs building and references to .nodeRequire