forked from aparajita/capacitor-secure-storage
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.mjs
39 lines (37 loc) · 1013 Bytes
/
rollup.config.mjs
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
39
import json from '@rollup/plugin-json'
// eslint-disable-next-line import/named
import { defineConfig } from 'rollup'
export default defineConfig({
plugins: [
json({
include: '**/info.json',
indent: ' ',
namedExports: false
})
],
input: 'dist/esm/index.js',
output: [
{
file: 'dist/plugin.js',
format: 'iife',
name: 'capacitorSecureStorage',
globals: {
'@capacitor/core': 'capacitorExports',
'javascript-blowfish': 'Blowfish',
tslib: 'tslib'
},
sourcemap: !!process.env.SOURCE_MAP,
inlineDynamicImports: true
},
{
file: 'dist/plugin.cjs.js',
format: 'cjs',
sourcemap: !!process.env.SOURCE_MAP,
inlineDynamicImports: true
}
],
external: ['@capacitor/core', 'javascript-blowfish', 'tslib'],
// This is for the code generated by decorators. If we don't specify this,
// it defaults to globalThis, which older android phones won't understand.
context: 'window'
})