import path from 'path'

export default {
  target: 'node',
  entry: path.resolve(__dirname, './entry.js'),
  output: {
    path: __dirname,
    filename: 'server-bundle.js',
    libraryTarget: 'commonjs2',
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: ['babel-loader'],
      },
    ],
  },
}

import path from 'path'

export default {
  target: 'node',
  mode: 'production',
  entry: path.resolve(__dirname, './entry.js'),
  output: {
    path: __dirname,
    filename: 'server-bundle.js',
    libraryTarget: 'commonjs2',
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: ['babel-loader'],
      },
    ],
  },
}

Fix a test warning