forked from rollup/rollup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.js
38 lines (36 loc) · 859 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
const path = require('path');
const external1 = "quoted'\r\n\u2028\u2029external1";
const external2 = path.join(__dirname, "quoted'\r\n\u2028\u2029external2");
const external3 = 'C:\\File\\Path.js';
module.exports = {
description: 'handles escaping for external ids',
options: {
output: {
paths: id => {
if (id === external3) return id;
return path.relative(__dirname, id);
},
name: 'Q',
globals: {
[external1]: 'quotedExternal1',
[external2]: 'quotedExternal2',
[external3]: 'quotedExternal3'
}
},
plugins: [
{
resolveId(id) {
if (id === 'external1') {
return { id: external1, external: true };
}
if (id === 'external2') {
return { id: external2, external: true };
}
if (id === 'external3') {
return { id: external3, external: true };
}
}
}
]
}
};