1
0
mirror of https://github.com/fluencelabs/fluence-js.git synced 2025-04-04 00:11:04 +00:00

45 lines
1011 B
TypeScript
Raw Normal View History

2022-08-30 01:12:06 +03:00
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import clear from 'rollup-plugin-clear';
import { swc, minify } from 'rollup-plugin-swc3';
import dts from 'rollup-plugin-dts';
2022-09-09 02:28:13 +03:00
import nodePolyfills from 'rollup-plugin-polyfill-node';
2022-08-30 01:12:06 +03:00
2022-08-30 15:22:24 +03:00
const input = './src/index.ts';
2022-08-30 01:12:06 +03:00
export default [
{
2022-08-30 15:22:24 +03:00
input: input,
2022-08-30 01:12:06 +03:00
output: [
{
dir: 'dist',
},
],
plugins: [dts()],
},
{
2022-08-30 15:22:24 +03:00
input: input,
2022-08-30 01:12:06 +03:00
output: [
{
sourcemap: true,
dir: 'dist',
format: 'cjs',
},
],
plugins: [
nodeResolve(),
2022-09-09 02:28:13 +03:00
nodePolyfills(),
2022-08-30 01:12:06 +03:00
commonjs({
ignoreDynamicRequires: true,
}),
2022-08-30 15:22:24 +03:00
swc({
sourceMaps: true,
}),
minify(),
clear({
targets: ['dist'],
}),
2022-08-30 01:12:06 +03:00
],
},
];