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.js 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * @copyright Copyright (c) 2016 John Molakvoæ <skjnldsv@protonmail.com>
  3. *
  4. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  5. * @author John Molakvoæ <skjnldsv@protonmail.com>
  6. * @author Julius Härtl <jus@bitgrid.net>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. *
  9. * @license GNU AGPL version 3 or any later version
  10. *
  11. * This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License as
  13. * published by the Free Software Foundation, either version 3 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. */
  25. const path = require('path')
  26. const webpack = require('webpack')
  27. module.exports = [
  28. {
  29. entry: {
  30. files_client: path.join(__dirname, 'src/files/client.js'),
  31. files_fileinfo: path.join(__dirname, 'src/files/fileinfo.js'),
  32. install: path.join(__dirname, 'src/install.js'),
  33. login: path.join(__dirname, 'src/login.js'),
  34. main: path.join(__dirname, 'src/main.js'),
  35. profile: path.join(__dirname, 'src/profile.js'),
  36. maintenance: path.join(__dirname, 'src/maintenance.js'),
  37. recommendedapps: path.join(__dirname, 'src/recommendedapps.js'),
  38. 'unified-search': path.join(__dirname, 'src/unified-search.js'),
  39. },
  40. output: {
  41. filename: '[name].js',
  42. path: path.resolve(__dirname, 'js/dist'),
  43. jsonpFunction: 'webpackJsonpCore',
  44. },
  45. module: {
  46. rules: [
  47. {
  48. test: /davclient/,
  49. loader: 'exports-loader',
  50. options: {
  51. type: 'commonjs',
  52. exports: 'dav',
  53. },
  54. },
  55. ],
  56. },
  57. plugins: [
  58. new webpack.ProvidePlugin({
  59. _: 'underscore',
  60. $: 'jquery',
  61. jQuery: 'jquery',
  62. }),
  63. ],
  64. },
  65. {
  66. entry: {
  67. systemtags: path.resolve(__dirname, 'src/systemtags/merged-systemtags.js'),
  68. },
  69. output: {
  70. filename: '[name].js',
  71. path: path.resolve(__dirname, 'js/dist'),
  72. },
  73. },
  74. ]