Created
June 3, 2018 07:45
-
-
Save krainboltgreene/22a7ef0dec8de7b2254306b16a5f3891 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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