react-ssr-boilerplate/webpack.server.js

17 lines
437 B
JavaScript
Raw Permalink Normal View History

2024-04-12 23:00:45 +00:00
const path = require('path');
2024-04-12 23:55:40 +00:00
const merge = require('webpack-merge');
const baseConfig = require('./webpack.base.js');
const webpackNodeExternals = require('webpack-node-externals');
2024-04-12 23:00:45 +00:00
2024-04-12 23:55:40 +00:00
const config = {
2024-04-12 23:00:45 +00:00
target: 'node',
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'build')
},
externals: [webpackNodeExternals()]
2024-04-12 23:55:40 +00:00
};
module.exports = merge(baseConfig, config);