Skip to content

Instantly share code, notes, and snippets.

@hyperh
Created December 5, 2016 03:44
Show Gist options
  • Save hyperh/7556f9e4fb551a64fbbf9b70c5ce9771 to your computer and use it in GitHub Desktop.
Save hyperh/7556f9e4fb551a64fbbf9b70c5ce9771 to your computer and use it in GitHub Desktop.
const { publicPath, assetsPath, commonLoaders } = require('./common.config');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
name: 'SSR',
context: path.join(__dirname, '..', 'app'),
entry: './SSR.js',
output: {
path: assetsPath,
filename: 'SSR.js',
libraryTarget: 'commonjs2',
publicPath,
},
target: 'node',
externals: nodeExternals(),
module: {
loaders: commonLoaders.concat([
{
test: /\.css$/,
loader: 'css/locals?module&localIdentName=[name]__[local]___[hash:base64:5]'
}
]),
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment