8054a532d7
* remove some of the react errors, start to fix webpack HMR errors * start upgrade to webpack 4 * more stuff to update webpack * update webpack configs to work with webpack 4 * remove linting from truncate script
46 lines
No EOL
804 B
JavaScript
46 lines
No EOL
804 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
module.exports = {
|
|
|
|
entry: path.resolve(__dirname, '../server/server.js'),
|
|
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist/'),
|
|
filename: 'server.bundle.js',
|
|
},
|
|
|
|
target: 'node',
|
|
mode: 'production',
|
|
|
|
node: {
|
|
__filename: true,
|
|
__dirname: true,
|
|
},
|
|
externals: [nodeExternals()],
|
|
|
|
resolve: {
|
|
extensions: ['*', '.js', '.jsx'],
|
|
modules: [
|
|
'client',
|
|
'node_modules',
|
|
],
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
options: {
|
|
babelrc: true
|
|
}
|
|
}, {
|
|
test: /\.json$/,
|
|
loader: 'json-loader',
|
|
},
|
|
],
|
|
},
|
|
}; |