update the bundle config

This commit is contained in:
Yanzhen Yu
2018-10-11 16:44:38 +08:00
parent d59ba817cb
commit b3fdc44fc7
3 changed files with 23 additions and 7 deletions

View File

@@ -3,8 +3,19 @@ import typescript from 'rollup-plugin-typescript';
export default {
input: './src/index.ts',
plugins: [typescript()],
output: {
name: 'rrweb',
format: 'iife',
},
output: [
{
format: 'cjs',
file: './dist/index.js',
},
{
format: 'esm',
file: './dist/module.js',
},
{
name: 'rrwebSnapshot',
format: 'iife',
file: './dist/browser.js',
},
],
};