Skip to content

Instantly share code, notes, and snippets.

@hyperh
Created December 5, 2016 02:57
Show Gist options
  • Save hyperh/819e57d9d147d7ea20a738cb52616052 to your computer and use it in GitHub Desktop.
Save hyperh/819e57d9d147d7ea20a738cb52616052 to your computer and use it in GitHub Desktop.
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
name: 'SSR',
entry: './app/SSR.js',
output: {
path: path.join(__dirname, '.', 'dist', 'assets'),
filename: 'SSR.js',
libraryTarget: 'commonjs2',
publicPath: '/assets/',
},
target: 'node',
externals: nodeExternals(),
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
include: path.join(__dirname, '.', 'app'),
exclude: path.join(__dirname, '.', 'node_modules'),
},
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment