I have a file app/js/d3.jsin a brunch project that uses requirejs. When I create the file, the code in is app/js/d3.jsmerged into app.js, as expected. But this is wrapped up in what looks like some kind of need code, as follows:
require.register("js/d3", function(exports, require, module) {
window.onload = function() {
I'm new enough to demand that I cannot say if this should happen, or if this is an unexpected behavior from Brunch. When I search for require api for registration, I do not see the registration method.
What's happening? Why is my code wrapping this way? My config.coffee looks like this:
files:
javascripts:
joinTo:
"js/app.js": /^app/
"js/vendor.js": /^(bower_components|vendor)/
order:
before: [
'bower_components/queue-async/queue.js',
'bower_components/topojson/topojson.js',
'bower_components/topojson/topojson.js',
'bower_components/d3/d3.js',
'bower_components/requirejs/requirejs.js'
]
source
share