add sourcemap for terser bundles
This commit is contained in:
@@ -35,6 +35,7 @@ let configs = [
|
|||||||
name: 'record',
|
name: 'record',
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
file: toMinPath(toRecordPath(pkg.unpkg)),
|
file: toMinPath(toRecordPath(pkg.unpkg)),
|
||||||
|
sourcemap: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -67,6 +68,7 @@ let configs = [
|
|||||||
{
|
{
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
file: toMinPath(toRecordPath(pkg.module)),
|
file: toMinPath(toRecordPath(pkg.module)),
|
||||||
|
sourcemap: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -106,6 +108,7 @@ let configs = [
|
|||||||
name: 'rrweb',
|
name: 'rrweb',
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
file: toMinPath(pkg.unpkg),
|
file: toMinPath(pkg.unpkg),
|
||||||
|
sourcemap: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -160,6 +163,7 @@ let configs = [
|
|||||||
{
|
{
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
file: toMinPath(pkg.module),
|
file: toMinPath(pkg.module),
|
||||||
|
sourcemap: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -183,6 +187,7 @@ if (process.env.BROWSER_ONLY) {
|
|||||||
name: 'rrweb',
|
name: 'rrweb',
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
file: toMinPath(pkg.unpkg),
|
file: toMinPath(pkg.unpkg),
|
||||||
|
sourcemap: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ function getCode(): string {
|
|||||||
<link rel="stylesheet" href="../dist/rrweb.min.css" />
|
<link rel="stylesheet" href="../dist/rrweb.min.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="../dist/rrweb.js"></script>
|
<script src="../dist/rrweb.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const data = ${JSON.stringify({ events })}
|
const data = ${JSON.stringify({ events })}
|
||||||
const replayer = new rrweb.Replayer(data.events);
|
const replayer = new rrweb.Replayer(data.events);
|
||||||
|
|||||||
Reference in New Issue
Block a user