webpack.prod.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. const common = require('./webpack.common.js');
  2. const merge = require('webpack-merge');
  3. const webpack = require('webpack');
  4. const banner = `
  5. Threema Web.
  6. Copyright © 2016-2019 Threema GmbH (https://threema.ch/).
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU Affero General Public License as
  9. published by the Free Software Foundation, either version 3 of the
  10. License, or (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Affero General Public License for more details.
  15. You should have received a copy of the GNU Affero General Public License
  16. along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. `;
  18. module.exports = merge(common, {
  19. mode: 'production',
  20. devtool: 'source-map',
  21. performance: {
  22. hints: 'warning'
  23. },
  24. output: {
  25. pathinfo: false
  26. },
  27. plugins: [
  28. new webpack.DefinePlugin({"process.env.NODE_ENV": JSON.stringify("production")}),
  29. new webpack.optimize.ModuleConcatenationPlugin(),
  30. new webpack.NoEmitOnErrorsPlugin(),
  31. new webpack.BannerPlugin({banner: banner}),
  32. ],
  33. });