modified lib-jitsi-meet dev repo
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

webpack.config.js 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* global __dirname */
  2. var child_process = require('child_process'); // eslint-disable-line camelcase
  3. var process = require('process');
  4. var minimize
  5. = process.argv.indexOf('-p') !== -1
  6. || process.argv.indexOf('--optimize-minimize') !== -1;
  7. module.exports = {
  8. devtool: 'source-map',
  9. entry: {
  10. 'lib-jitsi-meet': './JitsiMeetJS.js'
  11. },
  12. module: {
  13. loaders: [ {
  14. // Version this build of the lib-jitsi-meet library.
  15. loader: 'string-replace',
  16. query: {
  17. flags: 'g',
  18. replace:
  19. child_process.execSync( // eslint-disable-line camelcase
  20. __dirname + '/get-version.sh')
  21. // The type of the return value of
  22. // child_process.execSync is either Buffer or String.
  23. .toString()
  24. // Shells may automatically append CR and/or LF
  25. // characters to the output.
  26. .trim(),
  27. search: '{#COMMIT_HASH#}'
  28. },
  29. test: __dirname + '/JitsiMeetJS.js'
  30. }, {
  31. // Transpile ES2015 (aka ES6) to ES5.
  32. exclude: [
  33. __dirname + '/modules/RTC/adapter.screenshare.js',
  34. __dirname + '/node_modules/'
  35. ],
  36. loader: 'babel',
  37. query: {
  38. presets: [
  39. 'es2015'
  40. ]
  41. },
  42. test: /\.js$/
  43. } ]
  44. },
  45. node: {
  46. // Allow the use of the real filename of the module being executed. By
  47. // default Webpack does not leak path-related information and provides a
  48. // value that is a mock (/index.js).
  49. __filename: true
  50. },
  51. output: {
  52. filename: '[name]' + (minimize ? '.min' : '') + '.js',
  53. library: 'JitsiMeetJS',
  54. libraryTarget: 'umd',
  55. sourceMapFilename: '[name].' + (minimize ? 'min' : 'js') + '.map'
  56. }
  57. };