webpack.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * @copyright Copyright (c) 2016 John Molakvoæ <skjnldsv@protonmail.com>
  3. *
  4. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  5. * @author Christopher Ng <chrng8@gmail.com>
  6. * @author Jan C. Borchardt <hey@jancborchardt.net>
  7. * @author John Molakvoæ <skjnldsv@protonmail.com>
  8. * @author Roeland Jago Douma <roeland@famdouma.nl>
  9. *
  10. * @license GNU AGPL version 3 or any later version
  11. *
  12. * This program is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License as
  14. * published by the Free Software Foundation, either version 3 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. *
  25. */
  26. const path = require('path')
  27. // TODO use @nextcloud/webpack-vue-config
  28. module.exports = {
  29. module: {
  30. rules: [
  31. {
  32. test: /\.(png|jpe?g|gif|svg|woff2?|eot|ttf)$/,
  33. loader: 'url-loader',
  34. options: {
  35. name: '[name].[ext]?[hash]',
  36. },
  37. },
  38. ]
  39. },
  40. entry: {
  41. 'settings-apps-users-management': path.join(__dirname, 'src', 'main-apps-users-management'),
  42. 'settings-admin-security': path.join(__dirname, 'src', 'main-admin-security'),
  43. 'settings-personal-security': path.join(__dirname, 'src', 'main-personal-security'),
  44. 'settings-personal-webauthn': path.join(__dirname, 'src', 'main-personal-webauth'),
  45. 'settings-nextcloud-pdf': path.join(__dirname, 'src', 'main-nextcloud-pdf'),
  46. 'settings-personal-info': path.join(__dirname, 'src', 'main-personal-info'),
  47. },
  48. output: {
  49. path: path.resolve(__dirname, './js'),
  50. publicPath: '/js/',
  51. filename: 'vue-[name].js?v=[contenthash]',
  52. chunkFilename: 'vue-[name].js?v=[contenthash]',
  53. jsonpFunction: 'webpackJsonpSettings',
  54. },
  55. optimization: {
  56. splitChunks: {
  57. automaticNameDelimiter: '-',
  58. },
  59. },
  60. }