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.config.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. const process = require('process');
  2. const sharedConfig = require('./webpack-shared-config');
  3. module.exports = (_env, argv) => {
  4. // Despite what whe docs say calling webpack with no arguments results in mode not being set.
  5. const mode = typeof argv.mode === 'undefined' ? 'production' : argv.mode;
  6. const config
  7. = sharedConfig(mode === 'production' /* minimize */, Boolean(process.env.ANALYZE_BUNDLE) /* analyzeBundle */);
  8. return [
  9. Object.assign({}, config, {
  10. entry: {
  11. 'lib-jitsi-meet': './index.js'
  12. },
  13. output: Object.assign({}, config.output, {
  14. library: 'JitsiMeetJS',
  15. libraryTarget: 'umd',
  16. path: process.cwd()
  17. })
  18. }),
  19. {
  20. entry: {
  21. worker: './modules/e2ee/Worker.js'
  22. },
  23. mode,
  24. output: {
  25. filename: 'lib-jitsi-meet.e2ee-worker.js',
  26. path: process.cwd()
  27. },
  28. optimization: {
  29. minimize: false
  30. }
  31. }
  32. ];
  33. };