Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const path = require("path");
const WebpackNodeExternals = require('webpack-node-externals')
module.exports = [
{
mode: process.env.NODE_ENV || "development",
entry: "./source/server/index.js",
target: "node",
externals: [
WebpackNodeExternals()
],
output: {
path: path.resolve(__dirname, "tmp"),
filename: "server.js",
libraryTarget: "commonjs2"
},
module: {
rules: [
{
test: /index\.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
You can’t perform that action at this time.