The code powering m.abunchtell.com https://m.abunchtell.com
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

40 řádky
1.0 KiB

  1. // Note: You must restart bin/webpack-dev-server for changes to take effect
  2. /* eslint global-require: 0 */
  3. const webpack = require('webpack');
  4. const merge = require('webpack-merge');
  5. const CompressionPlugin = require('compression-webpack-plugin');
  6. const sharedConfig = require('./shared.js');
  7. const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
  8. module.exports = merge(sharedConfig, {
  9. devtool: 'source-map', // separate sourcemap file, suitable for production
  10. output: { filename: '[name]-[chunkhash].js' },
  11. plugins: [
  12. new webpack.optimize.UglifyJsPlugin({
  13. compress: true,
  14. mangle: true,
  15. output: {
  16. comments: false,
  17. },
  18. sourceMap: true,
  19. }),
  20. new CompressionPlugin({
  21. asset: '[path].gz[query]',
  22. algorithm: 'gzip',
  23. test: /\.(js|css|svg|eot|ttf|woff|woff2)$/,
  24. }),
  25. new BundleAnalyzerPlugin({ // generates report.html and stats.json
  26. analyzerMode: 'static',
  27. generateStatsFile: true,
  28. openAnalyzer: false,
  29. }),
  30. ],
  31. });