wallet-core/rollup.config.js
2019-12-06 01:03:45 +01:00

58 lines
1.2 KiB
JavaScript

// rollup.config.js
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import json from '@rollup/plugin-json';
import builtins from 'builtin-modules'
const walletCli = {
input: 'dist/node/headless/taler-wallet-cli.js',
output: {
file: 'dist/standalone/taler-wallet-cli.js',
format: 'cjs'
},
plugins: [
json(),
nodeResolve({
external: builtins,
preferBuiltins: true
}),
commonjs({
include: ['node_modules/**', 'dist/node/**'],
extensions: [ '.js' ],
ignoreGlobal: false, // Default: false
sourceMap: false,
ignore: [ 'taler-wallet' ]
})
]
};
const walletAndroid = {
input: 'dist/node/android/index.js',
output: {
file: 'dist/standalone/taler-wallet-android.js',
format: 'cjs',
exports: 'named',
},
plugins: [
json(),
nodeResolve({
external: builtins,
preferBuiltins: true
}),
commonjs({
include: ['node_modules/**', 'dist/node/**'],
extensions: [ '.js' ],
ignoreGlobal: false, // Default: false
sourceMap: false,
ignore: [ 'taler-wallet' ]
})
]
};
export default [walletCli, walletAndroid];