loaderOptionsPlugin.test.js.snap 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`loaderOptionsPlugin transforms correctly using "loaderOptionsPlugin-0" data 1`] = `
  3. "// Do not create LoaderOptionsPlugin is not necessary
  4. module.exports = {
  5. plugins: [
  6. new SomePlugin()
  7. ]
  8. }
  9. "
  10. `;
  11. exports[`loaderOptionsPlugin transforms correctly using "loaderOptionsPlugin-1" data 1`] = `
  12. "module.exports = {
  13. plugins: [
  14. new webpack.optimize.UglifyJsPlugin(),
  15. new webpack.LoaderOptionsPlugin({
  16. foo: 'bar',
  17. debug: true,
  18. minimize: true
  19. })
  20. ]
  21. }
  22. "
  23. `;
  24. exports[`loaderOptionsPlugin transforms correctly using "loaderOptionsPlugin-2" data 1`] = `
  25. "// Don't modify LoaderOptionsPlugin
  26. module.exports = {
  27. plugins: [
  28. new SomePlugin(),
  29. new webpack.LoaderOptionsPlugin({
  30. foo: 'bar'
  31. })
  32. ]
  33. }
  34. "
  35. `;
  36. exports[`loaderOptionsPlugin transforms correctly using "loaderOptionsPlugin-3" data 1`] = `
  37. "// Don't modify LoaderOptionsPlugin
  38. const ExtractTextPlugin = require('extract-text-webpack-plugin');
  39. module.exports = {
  40. entry: ['./index.js'],
  41. output: {
  42. filename: 'bundle.js'
  43. },
  44. module: {
  45. rules: [{
  46. test: /\\\\.css$/,
  47. use: ExtractTextPlugin.extract([
  48. 'css-loader'
  49. ])
  50. }]
  51. },
  52. }
  53. "
  54. `;