uglifyJsPlugin.test.js.snap 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`uglifyJsPlugin transforms correctly using "uglifyJsPlugin-0" data 1`] = `
  3. "module.exports = {
  4. optimization: {
  5. minimize: true
  6. }
  7. }
  8. "
  9. `;
  10. exports[`uglifyJsPlugin transforms correctly using "uglifyJsPlugin-1" data 1`] = `
  11. "const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  12. module.exports = {
  13. devtool: \\"source-map\\",
  14. optimization: {
  15. minimize: true,
  16. minimizer: [new UglifyJsPlugin({
  17. sourceMap: true,
  18. compress: {}
  19. })]
  20. }
  21. }
  22. "
  23. `;
  24. exports[`uglifyJsPlugin transforms correctly using "uglifyJsPlugin-2" data 1`] = `
  25. "const Uglify = require('uglifyjs-webpack-plugin');
  26. module.exports = {
  27. devtool: \\"source-map\\",
  28. optimization: {
  29. minimize: true,
  30. minimizer: [new Uglify({
  31. sourceMap: true,
  32. compress: {}
  33. })]
  34. }
  35. }
  36. "
  37. `;
  38. exports[`uglifyJsPlugin transforms correctly using "uglifyJsPlugin-3" data 1`] = `
  39. "module.exports = {
  40. devtool: 'eval',
  41. entry: [
  42. './src/index'
  43. ],
  44. output: {
  45. path: path.join(__dirname, 'dist'),
  46. filename: 'index.js'
  47. },
  48. module: {
  49. loaders: [{
  50. test: /.js$/,
  51. loaders: ['babel'],
  52. include: path.join(__dirname, 'src')
  53. }]
  54. },
  55. resolve: {
  56. root: path.resolve('/src'),
  57. modules: ['node_modules']
  58. },
  59. plugins: [new webpack.optimize.OccurrenceOrderPlugin()],
  60. debug: true,
  61. optimization: {
  62. minimize: true
  63. }
  64. };
  65. "
  66. `;
  67. exports[`uglifyJsPlugin transforms correctly using "uglifyJsPlugin-4" data 1`] = `
  68. "const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  69. module.exports = {
  70. devtool: 'eval',
  71. entry: [
  72. './src/index'
  73. ],
  74. output: {
  75. path: path.join(__dirname, 'dist'),
  76. filename: 'index.js'
  77. },
  78. module: {
  79. loaders: [{
  80. test: /.js$/,
  81. loaders: ['babel'],
  82. include: path.join(__dirname, 'src')
  83. }]
  84. },
  85. resolve: {
  86. root: path.resolve('/src'),
  87. modules: ['node_modules']
  88. },
  89. plugins: [new webpack.optimize.OccurrenceOrderPlugin()],
  90. debug: true,
  91. optimization: {
  92. minimize: true,
  93. minimizer: [new UglifyJsPlugin({
  94. sourceMap: true
  95. })]
  96. }
  97. };
  98. "
  99. `;