/
preprocessor-option.test.js.snap
91 lines (75 loc) · 4.46 KB
/
preprocessor-option.test.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`'process' option should work with Async "preprocessor" Function option: errors 1`] = `Array []`;
exports[`'process' option should work with Async "preprocessor" Function option: module 1`] = `
"// Imports
var ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ = require(\\"../../src/runtime/getUrl.js\\");
var ___HTML_LOADER_IMPORT_0___ = require(\\"./image.png\\");
// Module
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
var code = \\"<div>\\\\n <p>Alexander Krasnoyarov</p>\\\\n <img src=\\\\\\"\\" + ___HTML_LOADER_REPLACEMENT_0___ + \\"\\\\\\" alt=\\\\\\"alt\\\\\\" />\\\\n<div>\\\\n\\";
// Exports
module.exports = code;"
`;
exports[`'process' option should work with Async "preprocessor" Function option: result 1`] = `
"<div>
<p>Alexander Krasnoyarov</p>
<img src=\\"/webpack/public/path/image.png\\" alt=\\"alt\\" />
<div>
"
`;
exports[`'process' option should work with Async "preprocessor" Function option: warnings 1`] = `Array []`;
exports[`'process' option should work with the "preprocessor" option #2: errors 1`] = `Array []`;
exports[`'process' option should work with the "preprocessor" option #2: module 1`] = `
"// Imports
var ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ = require(\\"../../src/runtime/getUrl.js\\");
var ___HTML_LOADER_IMPORT_0___ = require(\\"./image.png.webp\\");
var ___HTML_LOADER_IMPORT_1___ = require(\\"./image.png\\");
// Module
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
var ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);
var code = \\"<picture><source type=\\\\\\"image/webp\\\\\\" srcset=\\\\\\"\\" + ___HTML_LOADER_REPLACEMENT_0___ + \\"\\\\\\"><img src=\\\\\\"\\" + ___HTML_LOADER_REPLACEMENT_1___ + \\"\\\\\\"></picture>\\\\n\\";
// Exports
module.exports = code;"
`;
exports[`'process' option should work with the "preprocessor" option #2: result 1`] = `
"<picture><source type=\\"image/webp\\" srcset=\\"/webpack/public/path/image.png.webp\\"><img src=\\"/webpack/public/path/image.png\\"></picture>
"
`;
exports[`'process' option should work with the "preprocessor" option #2: warnings 1`] = `Array []`;
exports[`'process' option should work with the "preprocessor" option: errors 1`] = `Array []`;
exports[`'process' option should work with the "preprocessor" option: module 1`] = `
"// Imports
var ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ = require(\\"../../src/runtime/getUrl.js\\");
var ___HTML_LOADER_IMPORT_0___ = require(\\"./image.png\\");
// Module
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
var code = \\"<div>\\\\n <p>Alexander Krasnoyarov</p>\\\\n <img src=\\\\\\"\\" + ___HTML_LOADER_REPLACEMENT_0___ + \\"\\\\\\" alt=\\\\\\"alt\\\\\\" />\\\\n<div>\\\\n\\";
// Exports
module.exports = code;"
`;
exports[`'process' option should work with the "preprocessor" option: result 1`] = `
"<div>
<p>Alexander Krasnoyarov</p>
<img src=\\"/webpack/public/path/image.png\\" alt=\\"alt\\" />
<div>
"
`;
exports[`'process' option should work with the "preprocessor" option: warnings 1`] = `Array []`;
exports[`'process' option should work with the Async "preprocessor" Function option #2: errors 1`] = `Array []`;
exports[`'process' option should work with the Async "preprocessor" Function option #2: module 1`] = `
"// Imports
var ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ = require(\\"../../src/runtime/getUrl.js\\");
var ___HTML_LOADER_IMPORT_0___ = require(\\"./image.png.webp\\");
var ___HTML_LOADER_IMPORT_1___ = require(\\"./image.png\\");
// Module
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
var ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_1___);
var code = \\"<picture><source type=\\\\\\"image/webp\\\\\\" srcset=\\\\\\"\\" + ___HTML_LOADER_REPLACEMENT_0___ + \\"\\\\\\"><img src=\\\\\\"\\" + ___HTML_LOADER_REPLACEMENT_1___ + \\"\\\\\\"></picture>\\\\n\\";
// Exports
module.exports = code;"
`;
exports[`'process' option should work with the Async "preprocessor" Function option #2: result 1`] = `
"<picture><source type=\\"image/webp\\" srcset=\\"/webpack/public/path/image.png.webp\\"><img src=\\"/webpack/public/path/image.png\\"></picture>
"
`;
exports[`'process' option should work with the Async "preprocessor" Function option #2: warnings 1`] = `Array []`;