text: const nodeExternals = require('webpack-node-externals');
  const VueSSRServerPlugin = require('vue-server-renderer/server-plugin');
  const VueSSRClientPlugin = require('vue-server-renderer/client-plugin');
  
  const serverConfig = {
    entry: './src/entry-server.js',
    target: 'node',
    devtool: 'source-map',
    output: {
      libraryTarget: 'commonjs2',
    },
    externals: nodeExternals({
      whitelist: /\.css$/,
    }),
    optimization: {
      splitChunks: false,
    },
    // This is the plugin that turns the entire output of the server build
    // into a single JSON file. The default file name will be
    // `vue-ssr-server-bundle.json`
    plugins: [
      new VueSSRServerPlugin(),
    ],
  };
  
  const cilentConfig = {
    entry: './src/entry-client.js',
    plugins: [
      // This plugins generates `vue-ssr-client-manifest.json` in the
      // output directory.
      new VueSSRClientPlugin(),
    ],
  };
  
  module.exports = {
    outputDir: 'dist',
    configureWebpack: process.env.TARGET_ENV === 'server' ? serverConfig : cilentConfig,
  };
  