jsonpath-mapper
Version:
A json to json transformation utility with a few nice features to use when translating for example API responses into a domain object for use in your domain-driven JavaScript applications. Can be used in React applications with the 'useMapper' hook.
31 lines (29 loc) • 683 B
JavaScript
import typescriptPlugin from '@rollup/plugin-typescript';
import dtsPlugin from 'rollup-plugin-dts';
export default [
{
input: 'src/index.ts',
output: [
{
file: 'dist/jsonpath-mapper.cjs.js',
format: 'cjs',
// exports: 'named',
},
{
file: 'dist/jsonpath-mapper.js',
format: 'es',
},
{
file: 'dist/jsonpath-mapper.mjs',
format: 'es',
},
],
external: ['jsonpath-plus'],
plugins: [typescriptPlugin()],
},
{
input: 'src/index.ts',
output: [{ file: 'dist/jsonpath-mapper.d.ts', format: 'es' }],
plugins: [dtsPlugin()],
},
];