forked from sberdevices/plasma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
31 lines (30 loc) · 908 Bytes
/
rollup.config.js
File metadata and controls
31 lines (30 loc) · 908 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
29
30
31
import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import { getBabelOutputPlugin } from '@rollup/plugin-babel';
import path from 'path';
const outDir = 'es';
export default {
input: 'src/index.ts',
treeshake: {
propertyReadSideEffects: false,
},
output: {
dir: outDir,
format: 'es',
freeze: false,
esModule: true,
sourcemap: true,
exports: 'named',
},
external: (id) => {
if (id.startsWith('regenerator-runtime') || id === 'tslib') {
return false;
}
return !id.startsWith('.') && !path.isAbsolute(id);
},
plugins: [
nodeResolve(),
typescript({ outDir, declaration: false, declarationMap: false, module: 'esnext' }),
getBabelOutputPlugin({ plugins: ['babel-plugin-annotate-pure-calls'] }),
],
};