2
0

rspack.headless.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. const path = require('path');
  2. const { merge } = require('webpack-merge');
  3. const common = require('../rspack/rspack.common.js');
  4. module.exports = merge(common, {
  5. entry: {
  6. 'converse-headless': '@converse/headless',
  7. 'converse-headless.min': '@converse/headless',
  8. },
  9. output: {
  10. path: path.resolve(__dirname, '../src/headless/dist'),
  11. filename: '[name].js',
  12. chunkFilename: '[name].js',
  13. globalObject: 'this',
  14. library: {
  15. name: 'converse',
  16. type: 'umd',
  17. },
  18. },
  19. mode: 'production',
  20. module: {
  21. rules: [
  22. {
  23. test: /\.js$/,
  24. include: [
  25. /src/,
  26. /node_modules\/mergebounce/,
  27. /node_modules\/lit-html/,
  28. /node_modules\/strophe/,
  29. /node_modules\/pluggable/,
  30. /node_modules\/@converse/,
  31. ],
  32. type: 'javascript/auto', // Let RSPack handle these files with built-in SWC
  33. },
  34. ],
  35. },
  36. });