const webpackConfig = require('../../webpack.config.base');

const libraryName = 'service.middle.bundle';

webpackConfig.entry = ['babel-polyfill', `${__dirname}/src/index.js`];

webpackConfig.output.path = `${__dirname}/dist`;
webpackConfig.output.publicPath = `${__dirname}\\dist`;
webpackConfig.output.filename = `${libraryName}.js`;
webpackConfig.output.library = libraryName;
// webpackConfig.externals = [
//     function(context, request, callback) {
//         if (request.indexOf("apollo-engine-binary") > -1) {
//         return callback(null, "commonjs " + request);
//         }
//         callback();
//     },
// ]

module.exports = webpackConfig;
