mirror of
https://github.com/ApfelTeeSaft/R2-Explorer.git
synced 2026-08-26 19:33:39 +00:00
31 lines
732 B
JavaScript
31 lines
732 B
JavaScript
import bundleSize from 'rollup-plugin-bundle-size'
|
|
import { defineConfig } from 'rollup'
|
|
import terser from '@rollup/plugin-terser'
|
|
import typescript from '@rollup/plugin-typescript'
|
|
import copy from 'rollup-plugin-copy'
|
|
|
|
export default defineConfig({
|
|
input: 'src/index.ts',
|
|
output: [
|
|
{ format: 'cjs', file: 'dist/index.js' },
|
|
{ format: 'es', file: 'dist/index.mjs' },
|
|
],
|
|
plugins: [
|
|
typescript({
|
|
sourceMap: false,
|
|
filterRoot: 'src'
|
|
}),
|
|
terser(),
|
|
bundleSize(),
|
|
copy({
|
|
targets: [
|
|
{
|
|
src: ['../LICENSE', '../README.md'],
|
|
dest: '.',
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
external: ['itty-router', 'zod', '@cloudflare/itty-router-openapi', 'postal-mime'],
|
|
})
|