diff --git a/packages/rrweb/rollup.config.js b/packages/rrweb/rollup.config.js index 4afb1ace2f..998433bda9 100644 --- a/packages/rrweb/rollup.config.js +++ b/packages/rrweb/rollup.config.js @@ -125,6 +125,7 @@ function getPlugins(options = {}) { webWorkerLoader({ targetPlatform: 'browser', inline: true, + preserveSource: true, sourceMap, }), esbuild({ @@ -144,7 +145,11 @@ for (const c of baseConfigs) { resolve({ browser: true }), // supports bundling `web-worker:..filename` - webWorkerLoader({ targetPlatform: 'browser' }), + webWorkerLoader({ + targetPlatform: 'browser', + inline: true, + preserveSource: true, + }), typescript(), ];