From 49ebbc577e1765729a61246dd86047c4ce00e0dc Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] fix bundle config --- packages/rrweb/rollup.config.js | 79 ++++++++++++++++----------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/packages/rrweb/rollup.config.js b/packages/rrweb/rollup.config.js index f97ceb23..65cfafc4 100644 --- a/packages/rrweb/rollup.config.js +++ b/packages/rrweb/rollup.config.js @@ -4,7 +4,6 @@ import { terser } from 'rollup-plugin-terser'; import postcss from 'rollup-plugin-postcss'; import renameNodeModules from 'rollup-plugin-rename-node-modules'; import pkg from './package.json'; -const tsConfig = require('./tsconfig.json'); function toRecordPath(path) { return path @@ -47,35 +46,35 @@ function toMinPath(path) { const baseConfigs = [ // record only - // { - // input: './src/record/index.ts', - // name: 'rrwebRecord', - // pathFn: toRecordPath, - // }, - // // record and pack - // { - // input: './src/entries/record-pack.ts', - // name: 'rrwebRecord', - // pathFn: toRecordPackPath, - // }, - // // replay only - // { - // input: './src/replay/index.ts', - // name: 'rrwebReplay', - // pathFn: toReplayPath, - // }, - // // replay and unpack - // { - // input: './src/entries/replay-unpack.ts', - // name: 'rrwebReplay', - // pathFn: toReplayUnpackPath, - // }, - // // record and replay - // { - // input: './src/index.ts', - // name: 'rrweb', - // pathFn: (p) => p, - // }, + { + input: './src/record/index.ts', + name: 'rrwebRecord', + pathFn: toRecordPath, + }, + // record and pack + { + input: './src/entries/record-pack.ts', + name: 'rrwebRecord', + pathFn: toRecordPackPath, + }, + // replay only + { + input: './src/replay/index.ts', + name: 'rrwebReplay', + pathFn: toReplayPath, + }, + // replay and unpack + { + input: './src/entries/replay-unpack.ts', + name: 'rrwebReplay', + pathFn: toReplayUnpackPath, + }, + // record and replay + { + input: './src/index.ts', + name: 'rrweb', + pathFn: (p) => p, + }, // all in one { input: './src/entries/all.ts', @@ -84,16 +83,16 @@ const baseConfigs = [ esm: true, }, // plugins - // { - // input: './src/plugins/console/record/index.ts', - // name: 'rrwebConsoleRecord', - // pathFn: toPluginPath('console', 'record'), - // }, - // { - // input: './src/plugins/console/replay/index.ts', - // name: 'rrwebConsoleReplay', - // pathFn: toPluginPath('console', 'replay'), - // }, + { + input: './src/plugins/console/record/index.ts', + name: 'rrwebConsoleRecord', + pathFn: toPluginPath('console', 'record'), + }, + { + input: './src/plugins/console/replay/index.ts', + name: 'rrwebConsoleReplay', + pathFn: toPluginPath('console', 'replay'), + }, ]; let configs = [];