You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webpack.prod.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. const path = require('path');
  2. module.exports = [{
  3. mode: 'production',
  4. target: "node",
  5. node: {
  6. global: true,
  7. process: true,
  8. __filename: false,
  9. __dirname: false,
  10. Buffer: true,
  11. },
  12. resolve: {
  13. // Add `.ts` and `.tsx` as a resolvable extension.
  14. extensions: [".ts", ".tsx", ".js"]
  15. },
  16. module: {
  17. rules: [
  18. { test: /\.ts?$/, loader: "ts-loader" }
  19. ]
  20. },
  21. externals: ['knex'],
  22. optimization: {
  23. minimize: false
  24. },
  25. entry: path.resolve(__dirname, 'Installer.ts'),
  26. output: {
  27. path: path.resolve(__dirname, '../../dist'),
  28. filename: 'Installer.js',
  29. libraryTarget: 'commonjs',
  30. }
  31. },{
  32. mode: 'production',
  33. target: "node",
  34. node: {
  35. global: true,
  36. process: true,
  37. __filename: false,
  38. __dirname: false,
  39. Buffer: true,
  40. },
  41. resolve: {
  42. // Add `.ts` and `.tsx` as a resolvable extension.
  43. extensions: [".ts", ".tsx", ".js"]
  44. },
  45. module: {
  46. rules: [
  47. { test: /\.ts?$/, loader: "ts-loader" }
  48. ]
  49. },
  50. externals:["./Installer"],
  51. optimization: {
  52. minimize: false
  53. },
  54. entry: path.resolve(__dirname, 'Launcher.ts'),
  55. output: {
  56. path: path.resolve(__dirname, '../../dist'),
  57. filename: 'FrontblockAdmin.js',
  58. libraryTarget: 'commonjs',
  59. }
  60. }]