wallet-core/rollup.config.js

57 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-12-02 18:12:59 +01:00
// 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'
},
2019-12-16 16:59:09 +01:00
external: builtins,
2019-12-02 18:12:59 +01:00
plugins: [
nodeResolve({
2019-12-16 16:59:09 +01:00
preferBuiltins: true,
2019-12-02 18:12:59 +01:00
}),
commonjs({
include: ['node_modules/**', 'dist/node/**'],
extensions: [ '.js' ],
ignoreGlobal: false, // Default: false
sourceMap: false,
ignore: [ 'taler-wallet' ]
2019-12-16 16:59:09 +01:00
}),
json(),
2019-12-02 18:12:59 +01:00
]
};
2019-12-05 19:38:19 +01:00
const walletAndroid = {
input: 'dist/node/android/index.js',
output: {
file: 'dist/standalone/taler-wallet-android.js',
2019-12-06 01:03:45 +01:00
format: 'cjs',
exports: 'named',
2019-12-05 19:38:19 +01:00
},
2019-12-16 16:59:09 +01:00
external: builtins,
2019-12-05 19:38:19 +01:00
plugins: [
json(),
nodeResolve({
preferBuiltins: true
}),
commonjs({
include: ['node_modules/**', 'dist/node/**'],
extensions: [ '.js' ],
ignoreGlobal: false, // Default: false
sourceMap: false,
ignore: [ 'taler-wallet' ]
})
]
};
export default [walletCli, walletAndroid];