/
_config.js
35 lines (33 loc) · 1019 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
const { assertIncludes } = require('../../../utils.js');
module.exports = {
description: 'aggregates warnings of different types',
command: 'rollup -c',
stderr: stderr => {
assertIncludes(
stderr,
'(!) Missing shims for Node.js built-ins\n' +
'Creating a browser bundle that depends on "url", "assert" and "path". You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node\n'
);
assertIncludes(
stderr,
'(!) Import of non-existent exports\n' +
'main.js\n' +
"4: import assert from 'assert';\n" +
"5: import path from 'path';\n" +
"6: import {doesNotExist, alsoNotFound} from './dep.js';\n" +
' ^\n' +
'7: \n' +
'8: export {url, assert, path};\n' +
'...and 1 other occurrence\n'
);
assertIncludes(
stderr,
"(!) Module level directives cause errors when bundled, 'use stuff' was ignored.\n" +
'main.js (1:0)\n' +
"1: 'use stuff';\n" +
' ^\n' +
'2: \n' +
"3: import url from 'url';\n"
);
}
};