Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created February 13, 2018 19:46
Show Gist options
  • Save jbaxleyiii/e3f906f9fd80a7675284c26efda8e3bc to your computer and use it in GitHub Desktop.
Save jbaxleyiii/e3f906f9fd80a7675284c26efda8e3bc to your computer and use it in GitHub Desktop.
const path = require("path");
module.exports = {
entry: ["./index.js"],
output: {
path: path.resolve(__dirname, "dist"),
filename: "./server.js",
},
externals: [
function(context, request, callback) {
if (request.indexOf("apollo-engine-binary") > -1) {
return callback(null, "commonjs " + request);
}
callback();
},
],
target: "node",
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment