/**
 * Common code required at all entry-points
 *
 * @module
 */
'use strict';

/**
 * Modules
 */
import 'babel-polyfill';
import 'source-map-support/register';
import { addPath } from 'app-module-path';
import path from 'path';

// Register the codebase root folder on the module import/require path
addPath(path.resolve(__dirname, '../../dist'));
/**
 * Common code required at all entry-points
 *
 * @module
 */
'use strict';

/**
 * Modules
 */
if (!global._babelPolyfill) { require('babel-polyfill'); } // acknowledgement: https://github.com/feathersjs/feathers-sequelize/issues/3
import 'source-map-support/register';
import { addPath } from 'app-module-path';
import path from 'path';

// Register the codebase root folder on the module import/require path
addPath(path.resolve(__dirname, '../../dist'));
Add safe require for `babel-polyfill`
Add safe require for `babel-polyfill`

Requiring `babel-polyfill` fails if it has already been loaded once, potentially by a parent module. This is a safe method learned from the Feathers.js code