Closed mAAdhaTTah closed 8 years ago
You're right it's not entirely clear from the readme.
You can pass a main
option that will automatically do the loadjs(['./foobar'])
for you.
For example
gulp.task('scripts', function () {
return browserify({debug: false})
.plugin('partition-bundle', {
'map': {
'app.js': ['./js/app']
},
'main': './js/app', // <-- this
'output': './build/js/',
'url': 'url/to/build/js'
})
.bundle()
.on('error', gutil.log);
});
I'm generating my entry file with gulp using the browserify api:
However, if I include the file directly:
app.js
doesn't execute. It appears to just be defined. If I include aloadjs
call directly after:then it executes. Based on the documentation, this isn't expected behavior. Am I doing something wrong or is there an issue here?