loaders.test.js.snap 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`loaders transforms correctly using "loaders-0" data 1`] = `
  3. "export default [{
  4. module: {
  5. rules: [{
  6. test: /\\\\.js$/,
  7. use: [{
  8. loader: 'babel-loader'
  9. }]
  10. }]
  11. }
  12. }, {
  13. module: {
  14. rules: [{
  15. test: /\\\\.css$/,
  16. use: [{
  17. loader: 'style-loader'
  18. }, {
  19. loader: 'css-loader',
  20. options: {
  21. modules: true,
  22. importLoaders: 1,
  23. string: 'test123'
  24. }
  25. }]
  26. }]
  27. }
  28. }, {
  29. module: {
  30. rules: [{
  31. test: /\\\\.css$/,
  32. use: [{
  33. loader: 'style-loader'
  34. }, {
  35. loader: 'css-loader',
  36. options: {
  37. modules: true
  38. }
  39. }]
  40. }]
  41. }
  42. }, {
  43. module: {
  44. rules:[{
  45. test: /\\\\.js$/,
  46. use: [{
  47. loader: 'eslint-loader'
  48. }],
  49. enforce: 'pre'
  50. }]
  51. }
  52. }, {
  53. module: {
  54. rules:[{
  55. test: /\\\\.js$/,
  56. use: [{
  57. loader: 'my-post-loader'
  58. }],
  59. enforce: 'post'
  60. }]
  61. }
  62. }, {
  63. module: {
  64. rules: [{
  65. test: /\\\\.js$/,
  66. use: [{
  67. loader: 'babel-loader'
  68. }]
  69. }, {
  70. test: /\\\\.js$/,
  71. use: [{
  72. loader: 'eslint-loader'
  73. }],
  74. enforce: 'pre'
  75. }]
  76. }
  77. }, {
  78. module: {
  79. rules: [{
  80. test: /\\\\.js$/,
  81. use: [{
  82. loader: 'babel-loader'
  83. }]
  84. }, {
  85. test: /\\\\.js$/,
  86. use: [{
  87. loader: 'my-post-loader'
  88. }],
  89. enforce: 'post'
  90. }]
  91. }
  92. }];
  93. "
  94. `;
  95. exports[`loaders transforms correctly using "loaders-1" data 1`] = `
  96. "export default {
  97. module: {
  98. rules: [{
  99. test: /\\\\.css$/,
  100. use: [{
  101. loader: 'style-loader'
  102. }, {
  103. loader: 'css-loader',
  104. options: {
  105. modules: true,
  106. importLoaders: 1,
  107. string: 'test123'
  108. }
  109. }]
  110. }]
  111. }
  112. }
  113. "
  114. `;
  115. exports[`loaders transforms correctly using "loaders-2" data 1`] = `
  116. "export default {
  117. module: {
  118. rules: [{
  119. test: /\\\\.css$/,
  120. use: [{
  121. loader: 'style-loader'
  122. }, {
  123. loader: 'css-loader',
  124. options: {
  125. modules: true
  126. }
  127. }]
  128. }]
  129. }
  130. }
  131. "
  132. `;
  133. exports[`loaders transforms correctly using "loaders-3" data 1`] = `
  134. "export default {
  135. module: {
  136. rules:[{
  137. test: /\\\\.js$/,
  138. use: [{
  139. loader: 'eslint-loader'
  140. }],
  141. enforce: 'pre'
  142. }]
  143. }
  144. }
  145. "
  146. `;
  147. exports[`loaders transforms correctly using "loaders-4" data 1`] = `
  148. "export default {
  149. module: {
  150. rules:[{
  151. test: /\\\\.js$/,
  152. use: [{
  153. loader: 'my-post-loader'
  154. }],
  155. enforce: 'post'
  156. }]
  157. }
  158. }
  159. "
  160. `;
  161. exports[`loaders transforms correctly using "loaders-5" data 1`] = `
  162. "export default {
  163. module: {
  164. rules: [{
  165. test: /\\\\.js$/,
  166. use: [{
  167. loader: 'babel-loader'
  168. }]
  169. }, {
  170. test: /\\\\.js$/,
  171. use: [{
  172. loader: 'eslint-loader'
  173. }],
  174. enforce: 'pre'
  175. }]
  176. }
  177. }
  178. "
  179. `;
  180. exports[`loaders transforms correctly using "loaders-6" data 1`] = `
  181. "export default {
  182. module: {
  183. rules: [{
  184. test: /\\\\.js$/,
  185. use: [{
  186. loader: 'babel-loader'
  187. }]
  188. }, {
  189. test: /\\\\.js$/,
  190. use: [{
  191. loader: 'my-post-loader'
  192. }],
  193. enforce: 'post'
  194. }]
  195. }
  196. }
  197. "
  198. `;
  199. exports[`loaders transforms correctly using "loaders-7" data 1`] = `
  200. "export default {
  201. module: {
  202. rules: [
  203. {
  204. test: /\\\\.js$/,
  205. exclude: /(node_modules)/,
  206. use: [{
  207. loader: 'babel-loader',
  208. options: {
  209. presets: ['env']
  210. }
  211. }]
  212. }
  213. ]
  214. }
  215. };
  216. "
  217. `;
  218. exports[`loaders transforms correctly using "loaders-8" data 1`] = `
  219. "module.exports = {
  220. module: {
  221. rules: [
  222. {
  223. test: /\\\\.js$/,
  224. use: [{
  225. loader: 'style-loader'
  226. }, {
  227. loader: 'css-loader',
  228. options: {
  229. modules: true,
  230. importLoaders: 1,
  231. string: 'test123'
  232. }
  233. }],
  234. include: path.join(__dirname, 'src')
  235. }
  236. ]
  237. }
  238. }
  239. "
  240. `;