UNPKG

cbp-lib

Version:

Libraries for cbp

94 lines (92 loc) 2.55 kB
import resolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' import external from 'rollup-plugin-peer-deps-external' import url from 'rollup-plugin-url' import babel from 'rollup-plugin-babel' import json from 'rollup-plugin-json' import minify from 'rollup-plugin-babel-minify' import globals from 'rollup-plugin-node-globals' import builtins from 'rollup-plugin-node-builtins'; import pkg from './package.json' export default [ { input: './src/index.js', output: [ // { // file: 'dist/index.js', // format: 'umd', // name: 'cbpLib', // globals: { // 'axios': 'axios', // 'yup': 'yup', // 'crypto-js/sha256': 'SHA256', // 'uuid/v4': 'uuid', // 'query-string': 'queryString', // 'crypto-js': 'CryptoJS' // } // }, { file: pkg.main, format: 'cjs' } ], plugins: [ json(), external(), //builtins(), // globals({ // global: true // }), resolve(), // so Rollup can find other modules commonjs(), // so Rollup can convert url(), babel({ exclude: 'node_modules/**' }), //minify() ], external: [ 'axios', 'yup', ] }, { input: './src/index.js', output: [ { file: pkg.module, format: 'es' } ], plugins: [ json(), external(), // builtins(), // globals({ // global: true // }), resolve(), // so Rollup can find other modules commonjs(), // so Rollup can convert url(), babel({ babelrc: false, exclude: 'node_modules/**', presets: [ [ "@babel/env" ] ], "plugins": [ "@babel/plugin-proposal-class-properties" ] }), //minify() ], external: [ 'crypto-js', 'crypto-js/sha256', 'axios', 'yup', ], } ]