mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
359 B
TypeScript
24 lines
359 B
TypeScript
import { rollup, Bundle } from 'rollup'
|
|
|
|
let cache: Bundle | undefined
|
|
|
|
async function main() {
|
|
const bundle = await rollup({
|
|
entry: 'main.js',
|
|
cache,
|
|
})
|
|
|
|
const result = bundle.generate({
|
|
format: 'cjs',
|
|
})
|
|
|
|
cache = bundle
|
|
|
|
await bundle.write({
|
|
format: 'cjs',
|
|
dest: 'bundle.js',
|
|
})
|
|
}
|
|
|
|
main()
|