/
_config.js
45 lines (44 loc) · 961 Bytes
/
_config.js
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
const path = require('path');
const ID_MAIN = path.join(__dirname, 'main.js');
module.exports = {
description: 'handles when a sourcemap cannot be resolved in a warning',
options: {
plugins: {
name: 'test-plugin',
transform() {
return { code: 'export default this', map: { mappings: '' } };
}
}
},
warnings: [
{
code: 'SOURCEMAP_ERROR',
id: ID_MAIN,
loc: {
column: 15,
file: ID_MAIN,
line: 1
},
message:
"Error when using sourcemap for reporting an error: Can't resolve original location of error.",
pos: 15
},
{
code: 'THIS_IS_UNDEFINED',
frame: `
1: export default this
^
`,
id: ID_MAIN,
loc: {
column: 15,
file: ID_MAIN,
line: 1
},
message:
"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",
pos: 15,
url: 'https://rollupjs.org/guide/en/#error-this-is-undefined'
}
]
};