Relation clobbers require fn
benkitzelman opened this issue · comments
In the compiled relation.js file, require is being declared as a variable before the usual
Spine = this.Spine || require('spine');
The offending line is https://github.com/spine/spine/blob/dev/src/relation.coffee#L3
As require is being assigned, coffeescript declares it as a var at the head of the file, rendering any calls intended for the original require useless. This prevents us from requiring it via browserify at compilation.
Could I suggest renaming the variable to something that isn't used by underlying frameworks (unless overriding this was the initial intention). It looks like its just an eval anyway... which is a little scary.
not sure when exactly this got fixed but seems to be okay in latest version. https://github.com/spine/spine/blob/dev/lib/relation.js
Let me know if there is something I am missing and it is still an issue
I fixed this in #533, not having seen this issue first. Browserify should be happy now.