const path = require('path');

module.exports = [{
  mode: 'production',
  target: "node",
  node: {
    global: true,
    process: true,
    __filename: false,
    __dirname: false,
    Buffer: true,
  },
  
  resolve: {
    // Add `.ts` and `.tsx` as a resolvable extension.

    extensions: [".ts", ".tsx", ".js"]
  },
  module: {
    rules: [
      { test: /\.ts?$/, loader: "ts-loader" }
    ]
  },

  externals: ['knex'],
  optimization: {
    minimize: false
  },
  entry: path.resolve(__dirname, 'Installer.ts'),
  output: {
      path: path.resolve(__dirname, '../../dist'),
      filename: 'Installer.js',
      libraryTarget: 'commonjs',
  }
},{
  mode: 'production',
  target: "node",
  node: {
    global: true,
    process: true,
    __filename: false,
    __dirname: false,
    Buffer: true,
  },

  
  resolve: {
    // Add `.ts` and `.tsx` as a resolvable extension.

    extensions: [".ts", ".tsx", ".js"]
  },
  module: {
    rules: [
      { test: /\.ts?$/, loader: "ts-loader" }
    ]
  },

  externals:["./Installer"],
  optimization: {
    minimize: false
  },
  entry: path.resolve(__dirname, 'Launcher.ts'),
  output: {
      path: path.resolve(__dirname, '../../dist'),
      filename: 'FrontblockAdmin.js',
      libraryTarget: 'commonjs',
  }
}]