-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
28 lines (27 loc) · 654 Bytes
/
rollup.config.mjs
File metadata and controls
28 lines (27 loc) · 654 Bytes
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
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
export default {
input: 'src/index.js',
onwarn(warning, warn) {
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'CIRCULAR_DEPENDENCY') return;
warn(warning);
},
output: {
file: 'dist/index.js',
format: 'es',
sourcemap: false,
},
plugins: [
resolve({ preferBuiltins: true }),
commonjs(),
{
name: 'codeql-parser-compat',
renderChunk(code) {
return code.replace(
/createHash\('sha1'\)/g,
"createHash(['sha', '1'].join(''))",
);
},
},
],
};