-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config-node.js
38 lines (37 loc) · 1.01 KB
/
rollup.config-node.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
import {babel} from '@rollup/plugin-babel';
import {eslint} from 'rollup-plugin-eslint';
import {uglify} from 'rollup-plugin-uglify';
import replace from 'rollup-plugin-replace';
export default {
input: 'src/exports.js',
treeshake: {
moduleSideEffects: [
'src/business/data-layer/data-layer.js',
'src/business/consent/consent.js'
],
},
plugins: [
eslint({
configFile: './src/.eslintrc.json'
}),
replace({
BUILD_BROWSER: 'false',
'@piano-sdk/storage': '../storage/storage.js',
delimiters: ['', '']
}),
babel({babelHelpers: 'bundled'}),
process.env.NODE_ENV === 'production' && uglify()
],
output: [
{
file: 'dist/browserless/piano-analytics.cjs.js',
format: 'cjs',
exports: 'auto'
},
{
file: 'dist/browserless/piano-analytics.esm.js',
format: 'es'
}
],
external: ['https']
};