const config = require('collections-online/shared/config');
// Always include collections-online's base
require('base')({
  helpers: require('../../shared/helpers')
});

// Project specific
require('analytics');

if(config.features.sitewidePassword) {
  require('./sitewide-password');
}

const config = require('collections-online/shared/config');
// Always include collections-online's base
// FIXME: For some reason require currently does not accept "base" as the
// module. To address this we have to provide a full path to the file.
require('../../node_modules/collections-online/app/scripts-browserify/base')({
  helpers: require('../../shared/helpers')
});

// Project specific
require('analytics');

if(config.features.sitewidePassword) {
  require('./sitewide-password');
}

Fix JavaScript error causing images not to be loaded
Fix JavaScript error causing images not to be loaded

The error is caused by AssetPage not being available in the window
scope. It is currently not included in browserify-index.js either. This
is despite the fact that it has been so earlier. Other browserify
scripts from collections-online are not included either.

The situation seems to be caused by require() currently not accepting 
"base" as a module name. To address this we have to provide a full path 
to the file.

This issue may be caused by gulp-browserify but we have not been able to
confirm this as the root cause.